An autonomous vehicle telemetry company manages its infrastructure deployments across Google Cloud environments using Cloud Build and Infrastructure as Code (Terraform). An internal architecture audit revealed two operational security vulnerabilities in the CI/CD pipeline: the pipeline executes using over-privileged default credentials, and concurrent deployment pipelines occasionally cause state file corruption and configuration race conditions. Which TWO actions should the cloud architect implement to address these vulnerabilities and optimize the SDLC pipeline? (Select TWO)
- Configure Cloud Build triggers to execute under a custom service account assigned only the minimal predefined roles required for resource provisioning.Answer
- BAssign the primitive Owner role (roles/owner) to the default Cloud Build service account to ensure uninterrupted execution across all GCP resources.
- Configure a Cloud Storage remote backend for Terraform state files with object versioning and state locking enabled.Answer
- DStore Terraform state files locally inside the CI/CD build workspace and commit them to source control after every build execution.
- EGrant the Cloud Build service account the Service Account Admin role (roles/iam.serviceAccountAdmin) at the organization level so it can impersonate service accounts.
Answer
The cloud architect should configure Cloud Build triggers to run under a custom service account with least-privilege roles, and store Terraform state in a Cloud Storage backend configured with state locking and object versioning.
Optimizing CI/CD pipelines for GCP infrastructure requires securing pipeline execution identities and ensuring concurrent state consistency. Executing Cloud Build triggers via a custom service account tailored with fine-grained roles enforces least privilege. Using Google Cloud Storage as a remote backend for Terraform state provides built-in locking mechanisms that prevent multiple build workers from causing state corruption.
Step-by-Step Solution
Key Concept
CI/CD Pipeline Security and Infrastructure as Code (IaC) State Management