A retail enterprise manages its workloads using a Google Cloud resource hierarchy structured with an Organization node and separate parent folders named Non-Production and Production. The Non-Production folder contains multiple projects dedicated to software development and automated testing. An external CI/CD deployment pipeline requires permissions to create, modify, and delete Compute Engine virtual machine instances and attached persistent disks across all current and future projects under the Non-Production folder. The security team requires that the solution minimizes management overhead while enforcing the principle of least privilege. Which IAM role assignment strategy should a Cloud Architect recommend?
- Grant the predefined Compute Instance Admin (v1) role to the deployment pipeline service account at the Non-Production folder level.Answer
- BGrant the Editor primitive role to the deployment pipeline service account at the Organization level.
- CGrant the Service Account Admin role to the deployment pipeline service account on every project inside the Non-Production folder.
- DGrant the Editor primitive role to the deployment pipeline service account on each project inside the Non-Production folder and configure VPC Service Controls to prevent exfiltration.
Answer
Granting the predefined Compute Instance Admin (v1) role to the deployment pipeline service account at the Non-Production folder level satisfies least privilege and scales across all child projects automatically.
Granting the predefined Compute Instance Admin (v1) role at the Non-Production folder level relies on Google Cloud resource hierarchy inheritance. Any present or future project created under the Non-Production folder inherits this binding automatically, reducing administrative overhead. Additionally, using a predefined compute role rather than a primitive role ensures the service account receives only the permissions needed to manage Compute Engine resources.
Step-by-Step Solution
Key Concept
IAM Resource Hierarchy Inheritance and Predefined Role Scoping