A financial technology enterprise uses a Google Cloud resource hierarchy containing a top-level folder named Payments-Service. The security team needs to grant an automated CI/CD deployment service account permission to manage Compute Engine resources across all present and future projects under the Payments-Service folder. Additionally, DevOps engineers must be able to deploy virtual machines running as this service account in specific projects without gaining permission to modify the service account itself. Which two actions should you take to implement this access model following Google-recommended best practices? (Select TWO.)
- Grant the Compute Admin role (`roles/compute.admin`) to the CI/CD service account at the Payments-Service folder level.Answer
- Grant the Service Account User role (`roles/iam.serviceAccountUser`) to DevOps engineers on the specific service account resource.Answer
- CGrant the Editor primitive role (`roles/editor`) to the CI/CD service account at the Organization node level.
- DGrant the Service Account Admin role (`roles/iam.serviceAccountAdmin`) to DevOps engineers at the Payments-Service folder level.
Answer
The correct architecture requires binding the Compute Admin predefined role to the CI/CD service account at the folder level to exploit IAM resource hierarchy inheritance, and granting the Service Account User role to DevOps engineers specifically on the service account identity resource.
Predefined roles bound at folder scope pass down permissions to child projects automatically via IAM resource hierarchy inheritance. Granting the Service Account User role on the identity resource ensures engineers can attach the service account to compute instances without gaining excessive administrative rights over the service account identity.
Step-by-Step Solution
Key Concept
IAM Resource Hierarchy Inheritance and Service Account Least Privilege