An enterprise data analytics platform is building an automated Infrastructure as Code (IaC) deployment pipeline using Terraform to provision Compute Engine instance groups and Kubernetes Engine (GKE) node pools across multiple projects. The pipeline is executed by an automated CI/CD service account. The solution must ensure state file integrity, prevent race conditions during parallel team deployments, prevent operational failures during sudden cluster scale-outs, and strictly follow the principle of least privilege for service account impersonation. Which TWO architectural practices should the cloud architect mandate?
- Configure the Terraform remote backend using a Google Cloud Storage bucket with Object Versioning enabled for state persistence and native locking.Answer
- Submit regional quota increase requests for Compute Engine CPU cores and node pool resources prior to initiating automated large-scale provisioning.Answer
- CStore the Terraform state file locally within the CI/CD runner container storage layer to minimize remote storage API latency.
- DAssign the primitive Owner role (`roles/owner`) to the compute instance service account to guarantee API access across all project resources.
- EGrant the CI/CD pipeline service account the Service Account Admin role (`roles/iam.serviceAccountAdmin`) on the target project to allow resource attachment.
Answer
The correct practices are configuring a Cloud Storage remote backend with Object Versioning for Terraform state locking and requesting regional quota increases in advance before large-scale compute provisioning.
Centralizing Terraform state in a Cloud Storage bucket with Object Versioning and native locking prevents state corruption and concurrent state modifications. Additionally, requesting regional CPU and compute resource quota increases in advance ensures automated deployment scripts do not fail due to GCP quota limits during rapid cluster scale-outs.
Step-by-Step Solution
Key Concept
Provisioning automated compute infrastructure requires safe state backend management, proactive quota planning, and strict IAM least-privilege scoping.