An enterprise telematics provider completed a rapid lift-and-shift migration of its vehicle tracking platform to Google Cloud. A technical debt assessment revealed two major operational risks: infrastructure configuration changes are frequently made directly in the Google Cloud console by engineers holding project-level Editor roles, and Terraform state files are stored locally on individual developer workstations. Which strategy should the cloud architect recommend to mitigate this technical debt while enforcing least privilege and automated governance?
- Migrate Terraform state to a remote Cloud Storage bucket with object versioning and state locking enabled, restrict console access by replacing project-level Editor roles with fine-grained IAM roles, and automate infrastructure deployments via Cloud Build service accounts.Cevap
- BCommit all local Terraform state files into a private source control repository, grant developers the project-level Owner role to prevent permission errors during deployments, and establish a policy requiring pull request approvals prior to manual local execution.
- CRefactor all workload compute resources to Google Kubernetes Engine (GKE) clusters to handle infrastructure state, while maintaining project-level Editor roles for development teams to streamline emergency console fixes.
- DReplace the underlying Cloud SQL relational database with Cloud Spanner to ensure global consistency, while continuing to allow local Terraform state storage with periodic manual Cloud Storage sync backups.
Cevap
Migrate Terraform state to a remote Cloud Storage bucket with object versioning and state locking enabled, restrict console access by replacing project-level Editor roles with fine-grained IAM roles, and automate infrastructure deployments via Cloud Build service accounts.
Centralizing Terraform state management into a Cloud Storage backend with object versioning and locking resolves state drift and prevents concurrent execution corruption. Eliminating broad primitive Editor roles in favor of least-privilege predefined roles and routing changes through Cloud Build pipelines enforces strict infrastructure-as-code governance and eliminates manual console modifications.
Adım Adım Çözüm
Anahtar Kavram
Mitigating IaC State Drift and IAM Technical Debt
Tahmini Süre:2m 0s