Soru

Zorluk: Çok zorContinuous Integration and Continuous Delivery (CI/CD) Pipeline Design

An organization is architecting an enterprise-wide CI/CD pipeline on Google Cloud to manage both infrastructure deployment using Terraform and microservice releases to private Google Kubernetes Engine (GKE) clusters across multiple isolated projects. The architecture must enforce strict security and compliance controls: build tasks must execute in a fully private network environment without internet exposure to prevent data exfiltration, infrastructure state must be protected against concurrency conflicts and corruption, and administrative permissions must strictly comply with the principle of least privilege. Which combination of GCP CI/CD toolchain configuration and architecture design satisfies all security and operational requirements?

  1. Execute Cloud Build build jobs using Cloud Build Private Pools attached to a peered VPC network within a VPC Service Controls perimeter. Maintain Terraform state in a Cloud Storage backend with object versioning and state locking enabled, and grant the pipeline service account fine-grained resource roles along with roles/iam.serviceAccountUser on target workload service accounts.Cevap
  2. B
    Execute Cloud Build jobs using standard shared worker pools while relying on GKE authorized networks for network isolation. Store Terraform state in a version-controlled repository, and assign the primitive roles/editor role to the Cloud Build service account to guarantee provisioning operations succeed across all target projects.
  3. C
    Execute Cloud Build jobs in Cloud Build Private Pools, but store Terraform state files in ephemeral local build workspace storage. Grant the pipeline service account roles/iam.serviceAccountAdmin to allow dynamic management and impersonation of workload identities during deployment.
  4. D
    Execute Cloud Build jobs using Private Pools without VPC Service Controls perimeters, relying solely on IAM policies to restrict outbound network access. Store Terraform state files in standard Cloud Storage buckets without versioning or state locking, and keep GKE control planes open to all internal project subnets.

Cevap

Execute Cloud Build build jobs using Cloud Build Private Pools attached to a peered VPC network within a VPC Service Controls perimeter. Maintain Terraform state in a Cloud Storage backend with object versioning and state locking enabled, and grant the pipeline service account fine-grained resource roles along with roles/iam.serviceAccountUser on target workload service accounts.
The solution utilizing Cloud Build Private Pools inside a VPC Service Controls perimeter provides complete network isolation without public IP exposure. Using a Cloud Storage backend configured with state locking and object versioning ensures concurrent Terraform executions do not corrupt state files. Finally, assigning fine-grained predefined roles paired with the Service Account User role enforces strict least privilege without granting administrative control over service accounts.

Adım Adım Çözüm

1
Establish secure network execution environment
Cloud Build Private Pools peered to a private VPC within a VPC Service Controls perimeter block internet exposure and prevent unauthorized data egress.
Standard Cloud Build pools run in multi-tenant environments without native VPC access, making Private Pools necessary for private GKE cluster interaction and VPC Service Controls enforcement.
2
Configure secure IaC state management
Using Google Cloud Storage as a remote Terraform backend with object versioning and state locking enabled ensures concurrency control and disaster recovery.
Local or unversioned state storage leads to race conditions, state drift, and vulnerability to corruption during continuous integration pipelines.
3
Apply least-privilege IAM controls for pipeline execution
Granting granular roles and roles/iam.serviceAccountUser allows the pipeline service account to attach workload identities to GKE resources without full administrative access.
Granting primitive roles or service account admin rights creates excessive permissions and risks privilege escalation.

Anahtar Kavram

Enterprise Secure CI/CD Architecture with Cloud Build, Private Pools, VPC SC, and IaC State Management
Tahmini Süre:3m 0s
Bu soruyu puanla