PROFESSIONAL-CLOUD-DEVELOPER · Question #281
You are defining your system tests for an application running in Cloud Run in a Google Cloud project. You need to create a testing environment that is isolated from the production environment. You wan
The correct answer is A. Using Cloud Build, execute Terraform scripts to create a new Google Cloud project and a Cloud. Full isolation requires a separate Google Cloud project so that test resources (IAM policies, APIs, data) cannot interact with the production project. Terraform (Infrastructure as Code) is the best tool for automation because it declaratively defines the entire environment, is id
Question
You are defining your system tests for an application running in Cloud Run in a Google Cloud project. You need to create a testing environment that is isolated from the production environment. You want to fully automate the creation of the testing environment with the least amount of effort and execute automated tests. What should you do?
Options
- AUsing Cloud Build, execute Terraform scripts to create a new Google Cloud project and a Cloud
- BUsing Cloud Build, execute a Terraform script to deploy a new Cloud Run revision in the existing
- CUsing Cloud Build, execute gcloud commands to create a new Google Cloud project and a Cloud
- DUsing Cloud Build, execute gcloud commands to deploy a new Cloud Run revision in the existing
How the community answered
(69 responses)- A64% (44)
- B9% (6)
- C4% (3)
- D23% (16)
Explanation
Full isolation requires a separate Google Cloud project so that test resources (IAM policies, APIs, data) cannot interact with the production project. Terraform (Infrastructure as Code) is the best tool for automation because it declaratively defines the entire environment, is idempotent, and is easy to maintain and re-execute. Option A satisfies both requirements: new project for isolation + Terraform for reliable automation. Option B deploys a new Cloud Run revision in the existing project - not isolated. Option C creates a new project (isolated) but uses gcloud commands instead of Terraform, which are harder to maintain, less idempotent, and require more effort than IaC scripts. Option D is both non-isolated (same project) and uses gcloud commands - the worst of both worlds.
Topics
Community Discussion
No community discussion yet for this question.