Intrigued by the art of cloud architecture? Discover how to design, develop, and manage robust, secure, scalable, and dynamic solutions on Google Cloud as you prepare for the Professional Cloud Architect exam!
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
A distributed engineering team is collaborating on Google Cloud infrastructure provisioning using Terraform. The team is experiencing issues where concurrent execution of terraform apply causes state corruption and race conditions. In addition, the team needs to protect sensitive state data and ensure that previous versions of the state file can be restored if corrupted.
Which backend configuration should you implement to satisfy these requirements?
The Google Cloud Storage (GCS) backend for Terraform is a native remote backend mechanism designed to store Terraform state files (.tfstate) securely in a centralized Cloud Storage bucket. Storing state centrally allows distributed teams to share a single, authoritative representation of their managed infrastructure.
gcs backend natively provides state locking using Cloud Storage object preconditions and generations. Whenever an engineer or CI/CD pipeline runs terraform plan or terraform apply, Terraform acquires an exclusive lock on the remote state file. This prevents concurrent executions from running simultaneously and corrupting the state.roles/storage.objectAdmin or roles/storage.objectViewer) and secured with customer-managed or Google-managed encryption keys.The gcs backend natively satisfies all enterprise requirements for state consistency, concurrency locking, disaster recovery, and fine-grained security without adding architectural complexity or third-party overhead.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.