Managing Multiple GCP Accounts with gcloud Configurations
You have one GCP account running in your default region and zone and another account running in a non-default region and zone. You want to start a new Compute Engine instance in these two Google Cloud Platform accounts using the command line interface. What should you do?
Community Insight
The exam tests your knowledge of gcloud context management, specifically trapping candidates with commands like 'list' that only display information rather than performing actions.
Learn how to manage multiple Google Cloud Platform accounts using gcloud configurations. This page clarifies that creating and activating distinct configurations is the correct method for switching contexts when provisioning resources.
Candidates often select options containing 'gcloud config list', mistakenly believing it activates a configuration or initiates resource creation, whereas it merely displays current settings.
Community Discussion (83 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option A is the only valid approach because it correctly utilizes the two-step process required for managing multiple cloud contexts in the gcloud CLI. First, you must create named configurations usinggcloud config configurations create to store specific account, project, region, and zone details. Second, you activate the desired configuration using gcloud config configurations activate, which sets the active context so that subsequent commands (like starting a Compute Engine instance) apply to the correct account and region.Why the Other Options Are Wrong
Options B, C, and D all fail because they suggest usinggcloud config configurations list. The list command is read-only; it displays the names of existing configurations but does not switch the active context nor does it execute any resource provisioning commands. You cannot start a Compute Engine instance by listing configurations. Additionally, Option C and D imply activating without creating, which is logically incomplete if the configurations do not yet exist, but the fatal flaw remains the use of the list command as an action trigger.Community Comment Notes
Community consensus strongly supports Option A, with multiple users highlighting the absurdity of using 'list' commands to start instances. As leba noted, "gcloud config configurations list does not help create instances." Other commenters emphasized that configurations are essentially saved profiles that must be activated to switch contexts, reinforcing why A is the only functional workflow.Official Reference
Exam Strategy
Always distinguish between commands that modify state (create, set, activate) and those that view state (list, get). In gcloud questions involving multiple environments, look for the pattern of 'create then activate' to switch contexts effectively.
Frequently Asked Questions
Why can't I just use gcloud auth login for each account?
While you can authenticate to different accounts, gcloud configurations allow you to save specific project, region, and zone defaults per account, making it easier to run commands without re-specifying flags.
What is the difference between gcloud config set and gcloud config configurations create?
'config set' modifies the currently active configuration's properties. 'configurations create' creates an entirely new named configuration profile that can be activated later.
Related Analysis
Practice All ACE Questions
Access 84 questions with complete answers and detailed explanations.
View Full ACE Practice Test →