A media enterprise organizes its Google Cloud environment into a parent folder named 'Video-Streaming', which contains sub-folders for 'Transcoding' and 'Distribution'. An automated deployment pipeline using a dedicated service account needs to create and delete Compute Engine VM instances across all projects under both sub-folders. The pipeline must not be granted permissions to modify IAM security policies, manage service accounts, or alter VPC firewall rules. Which IAM role configuration meets these requirements while adhering to the principle of least privilege and minimizing maintenance overhead?
- Grant the Compute Instance Admin (v1) role (roles/compute.instanceAdmin.v1) to the pipeline service account at the 'Video-Streaming' folder level.Answer
- BGrant the Editor primitive role (roles/editor) to the pipeline service account at the 'Video-Streaming' folder level.
- CGrant the Service Account Admin role (roles/iam.serviceAccountAdmin) to the pipeline service account on each project within the 'Transcoding' and 'Distribution' sub-folders.
- DGrant the Compute Admin role (roles/compute.admin) to the pipeline service account at the project level and configure IAM conditions to restrict data exfiltration across VPC perimeters.
Answer
Grant the Compute Instance Admin (v1) role (roles/compute.instanceAdmin.v1) to the pipeline service account at the 'Video-Streaming' folder level.
The correct option applies the predefined `roles/compute.instanceAdmin.v1` role at the parent folder node in the resource hierarchy. Google Cloud IAM permissions inherit down the resource tree, so binding the role at the parent folder grants the necessary VM lifecycle permissions across all child folders and projects while maintaining least privilege and reducing management complexity.
Step-by-Step Solution
Key Concept
GCP IAM Role Scoping and Resource Hierarchy Inheritance