Skip to main content

Professional Cloud Architect practice question · Managing implementation of cloud architecture

A platform team runs Terraform through a CI/CD pipeline. It wants every proposed change checked automatically against…

A platform team runs Terraform through a CI/CD pipeline. It wants every proposed change checked automatically against organization rules, such as allowed regions, with violations shown to the developer before terraform apply runs. What should the team do?

  • AAdd a pipeline step that runs gcloud beta terraform vet on the plan JSON against a constraint library, and fail the build on violations
  • BSet the gcp.resourceLocations organization policy constraint and let terraform apply report any denied resource creations
  • CConfigure Cloud Asset Inventory real-time feeds to alert the team when resources appear in disallowed regions
  • DStore Terraform state in a Cloud Storage bucket with object versioning and state locking enabled
Show the answer and explanation

Correct answer: A) Add a pipeline step that runs gcloud beta terraform vet on the plan JSON against a constraint library, and fail the build on violations

Policy-as-code validation with gcloud beta terraform vet checks the Terraform plan in CI before apply, so violations are blocked before they reach the cloud. Organization policies and asset monitoring act only during or after deployment.

Why each option is right or wrong

  • A) Correct. gcloud beta terraform vet reads terraform plan JSON and checks it against Constraint Framework policies. It returns a nonzero exit code when it finds violations, so it can stop the pipeline between the plan and apply stages.
  • B) Incorrect. Organization Policy is enforced by Google Cloud APIs when resources are created or changed, which happens during apply. It doesn't check the plan beforehand, so an apply can partly succeed before it fails.
  • C) Incorrect. Asset Inventory feeds report changes after resources already exist. That is detective monitoring, not a check before apply.
  • D) Incorrect. A remote state backend protects and shares state and prevents runs from overlapping. It doesn't evaluate planned resources against organization rules.
Exam domain
Managing implementation of cloud architecture · ~12.5% of Professional Cloud Architect
Question type
Multiple choice (one answer)

Practise the full Professional Cloud Architect exam

This question is one of a small free sample from the CertRidge Professional Cloud Architect bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with Google Cloud; never copied from the real exam.