You must list all Compute Engine instances across two projects (development and production) daily. How should you automate this?
Choose an answer
Tap an option to check your answer.
Correct answer: Create two gcloud configurations and write a script that activates each configuration and runs gcloud compute instances list per configuration..
Why this is the answer
The correct approach is to create two gcloud configurations, one for each project (development and production). A script can then activate each configuration sequentially and execute the gcloud compute instances list command. This allows you to easily switch between projects and list instances using the correct project context for each command. The gsutil command is for Cloud Storage operations, not Compute Engine, making that option incorrect. Cloud Shell is an interactive environment and not designed for automated, scheduled tasks. The GCP Console is a graphical user interface and cannot be used for scripting or automated daily exports.
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