A DevOps engineer is provisioning a Google Cloud Storage bucket to serve as a centralized remote backend for Infrastructure as Code (IaC) deployment state. The team requires a mechanism to recover previous state file revisions in case an automated pipeline introduces state corruption or accidental overwrites. Which configuration should be enabled on the Cloud Storage bucket to satisfy this requirement?
- Enable Object Versioning on the Cloud Storage bucket.Answer
- BStore the state files in an unversioned local directory on the deployment runner.
- CConfigure Customer-Supplied Encryption Keys (CSEK) on the bucket.
- DProvision a multi-region Cloud Spanner database instance to store raw state files.
Answer
Enable Object Versioning on the Cloud Storage bucket.
Enabling Object Versioning on a Google Cloud Storage bucket maintains a complete historical record of object modifications. If an automated IaC pipeline applies a breaking change or corrupts the state file, administrators can retrieve and restore prior object versions directly.
Step-by-Step Solution
Key Concept
Cloud Storage Object Versioning for IaC State Protection
Estimated Time:1m 0s