nerdexam
Google

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

Implementing CI/CD and Testing Strategies

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)
  • A
    64% (44)
  • B
    9% (6)
  • C
    4% (3)
  • D
    23% (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

#Cloud Run#Testing Environment#Terraform#CI/CD

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice