You have two GCP accounts with different default regions/zones. Using the gcloud CLI, how do you switch between them to create Compute Engine instances?
Choose an answer
Tap an option to check your answer.
Correct answer: Create two gcloud configurations with gcloud config configurations create [NAME], then use gcloud config configurations activate [NAME] to switch before creating instances..
Why this is the answer
The correct approach involves creating distinct gcloud configurations, each tailored to a specific GCP account and its default region/zone settings. The gcloud config configurations create [NAME] command establishes these separate configurations. To switch between them, you use gcloud config configurations activate [NAME]. Once a configuration is active, any subsequent gcloud commands, like creating Compute Engine instances, will use the settings defined within that active configuration. The incorrect options either misuse the commands (e.g., gcloud configurations list is for listing, not activating or creating instances) or suggest activating multiple configurations simultaneously, which is not how gcloud configurations work.
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