A Lead Cloud Architect is transitioning an enterprise infrastructure automation platform from Google Cloud Deployment Manager to Terraform within Cloud Build CI/CD pipelines. The new deployment pipeline must support multi-developer concurrent executions without state corruption, maintain recoverable state history, and strictly observe GCP least-privilege identity access controls during resource provisioning. Which TWO configurations must the architect implement to satisfy these security and operational requirements?
- Configure a remote Google Cloud Storage (GCS) backend for Terraform state files with object versioning enabled.Answer
- Grant the Cloud Build service account the roles/iam.serviceAccountUser role on specific target provisioning service accounts.Answer
- CStore state files in local storage on the Cloud Build runner and sync them to an unversioned bucket post-execution.
- DAssign the primitive roles/owner role to the Cloud Build service account at the Google Cloud organization node.
Answer
The architect must configure a remote Google Cloud Storage backend with object versioning enabled and grant the Cloud Build service account the Service Account User role on fine-grained target provisioning service accounts.
Configuring a Google Cloud Storage backend with object versioning ensures state locking during execution and retains state backup history. Combining this with granting the Service Account User role on specific target service accounts enforces least-privilege impersonation for Cloud Build deployments.
Step-by-Step Solution
Key Concept
Enterprise Terraform state backend configuration and secure service account impersonation in Google Cloud.