A high-throughput logistics firm uses Google Cloud Deploy to automate release pipelines for a mission-critical fleet management service running on Google Kubernetes Engine (GKE). The team is configuring a progressive release strategy that deploys candidate releases through a canary phase followed by automated rollout to production GKE targets upon successful validation. The release management team needs to ensure the execution service account used by Cloud Deploy has minimal required permissions to perform render and deploy operations on the GKE targets, while preventing infrastructure state corruption during automated Infrastructure as Code (IaC) pipeline runs. Which combination of IAM roles and pipeline state management configurations should be implemented to satisfy these operational and security requirements?
- Grant roles/clouddeploy.jobRunner and roles/container.developer to the Cloud Deploy execution service account, grant roles/iam.serviceAccountUser on the target GKE service account, and store pipeline Terraform state in a remote Cloud Storage bucket with versioning and object locking enabled.Answer
- BGrant the primitive roles/owner role to the Cloud Deploy execution service account across target projects to streamline pipeline rendering and cluster deployment permissions.
- CGrant roles/iam.serviceAccountAdmin to the Cloud Deploy execution service account so it can manage runtime service account credentials and attach them to GKE workloads.
- DGrant roles/clouddeploy.jobRunner to the Cloud Deploy execution service account, but maintain the automated pipeline's Terraform state file in unversioned local directory storage on the build runner to maximize execution speed.