GCP Professional Cloud Architect Practice Question

Your company uses Cloud Build to execute Terraform plans that provision GKE clusters and Cloud Storage buckets inside a production project. Security policy mandates that automation must follow the principle of least privilege and avoid unlimited permissions if the build pipeline is ever compromised. Which IAM approach best satisfies these requirements while still allowing Terraform to create and manage the necessary resources?

  • Grant the Cloud Build default service account the Project Owner role so Terraform can manage any resource it needs during the build.

  • Allow each developer's personal Google account the Service Account Token Creator (serviceAccountUser) role so they can impersonate the production service account when they trigger the build.

  • Create a dedicated service account for Terraform, grant it only the specific roles required to manage GKE and Cloud Storage, and configure Cloud Build to impersonate this service account when running terraform apply.

  • Generate a JSON key for a user-managed service account with the Project Editor role, store the key in Secret Manager, and have Cloud Build use the key to authenticate Terraform.

GCP Professional Cloud Architect
Managing implementation
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot