GCP Professional Cloud Architect Practice Question
Your platform team wants to standardize IaC workflows across dozens of projects. Requirements: 1) Terraform state must be versioned and encrypted at rest in Google Cloud. 2) Concurrent pipelines must be prevented from corrupting state. 3) All applies must run from a controlled build environment, not from engineers' laptops. Which approach satisfies all requirements while adding the least operational overhead?
Use Terraform Cloud as the backend but allow engineers to execute terraform locally; archive execution logs to Cloud Storage for auditing.
Check the tfstate file into the Git repository, enforce branch protection, and have developers run terraform from a shared Cloud Shell instance.
Configure the Terraform GCS backend to store state in a Cloud Storage bucket with object versioning and CMEK enabled, and run plan/apply steps from Cloud Build using a dedicated least-privilege service account.
Invoke Deployment Manager templates from Cloud Functions on a schedule and keep deployment state in Firestore documents.
Storing Terraform state in a Cloud Storage bucket with object versioning fulfills the need for state history, while CMEK (or default encryption) secures data at rest. The GCS backend implements a lock file that blocks simultaneous writers, protecting the state from concurrent corruption. Running plan/apply steps inside Cloud Build keeps execution in a centrally managed environment and removes the need for developers to have direct apply permissions or local state. The other options either lack versioned, remotely-locked state, violate the controlled execution requirement, or use services (Deployment Manager, Terraform Cloud SaaS) that do not meet the stated constraints.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Terraform state and why does it need versioning?
Open an interactive chat with Bash
What is CMEK in Google Cloud and how does it help with encryption?
Open an interactive chat with Bash
How does the GCS backend prevent state corruption in Terraform workflows?
Open an interactive chat with Bash
What is Terraform state, and why does it need to be versioned and encrypted?
Open an interactive chat with Bash
What is CMEK, and how does it enhance encryption for Terraform state in Google Cloud?
Open an interactive chat with Bash
How does Cloud Build ensure controlled workflows for Terraform plan/apply steps?
Open an interactive chat with Bash
GCP Professional Cloud Architect
Managing implementation
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .