An enterprise DevOps team is setting up an automated CI/CD pipeline using Cloud Build to provision cloud infrastructure via Terraform. To adhere to security governance, the build execution must run using a dedicated deployment service account with minimal IAM privileges rather than elevated project-level permissions. Which IAM role configuration should you implement to allow the Cloud Build service account to act as the deployment service account?
- AGrant the Service Account User role (roles/iam.serviceAccountUser) on the Cloud Build service account to the deployment service account.
- Grant the Service Account User role (roles/iam.serviceAccountUser) to the Cloud Build service account on the deployment service account resource.Cevap
- CGrant the Service Account Admin role (roles/iam.serviceAccountAdmin) to the Cloud Build service account at the project level.
- DGrant the Editor primitive role (roles/editor) to the Cloud Build service account at the project level.
Cevap
Grant the Service Account User role (roles/iam.serviceAccountUser) to the Cloud Build service account on the specific deployment service account resource.
To allow a CI/CD build runner such as Cloud Build to impersonate a dedicated deployment identity, the Cloud Build service account must be granted the Service Account User role directly on the deployment service account resource. This provides the minimum privilege required to execute jobs under that identity.
Adım Adım Çözüm
Anahtar Kavram
Least Privilege IAM Service Account Impersonation in Pipeline Automation