You need an isolated, fully automated test environment for Cloud Run, created with minimal effort and run by automated tests. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Use Cloud Build to run Terraform scripts that create a new Google Cloud project and deploy a Cloud Run instance of the app in that project..
Why this is the answer
Creating a new Google Cloud project for each test run ensures complete isolation, preventing interference between tests and with production environments. Terraform is ideal for this as it allows declarative infrastructure as code, making project creation and resource deployment repeatable and automated. Cloud Build orchestrates this process, executing the Terraform scripts. Deploying to an existing project with traffic splitting (options 2 and 4) doesn't provide full isolation, as other services or configurations in the project could impact the test. While gcloud commands (options 3 and 4) can create projects and deploy services, Terraform offers a more robust, auditable, and maintainable solution for managing infrastructure as code, which is generally preferred for automated environment provisioning.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed