Managing Multiple GCP Accounts with gcloud Configurations

Planning and implementing compute resources.

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?

  1. Create two configurations using gcloud config configurations create [NAME]. Run gcloud config configurations activate [NAME] to switch between accounts when running the commands to start the Compute Engine instances. Correct Answer
  2. Create two configurations using gcloud config configurations create [NAME]. Run gcloud configurations list to start the Compute Engine instances.
  3. Activate two configurations using gcloud configurations activate [NAME]. Run gcloud config list to start the Compute Engine instances.
  4. Activate two configurations using gcloud configurations activate [NAME]. Run gcloud configurations list to start the Compute Engine instances.
Answer Correct answer: A — Create two configurations using gcloud config configurations create [NAME] and switch between them using gcloud config configurations activate [NAME].

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)

ermlol13 👍 1 Selected: A
The Answer is A. gcloud compute instances create in one account, run the activation switch, and run the exact same creation command for the second account without manually rewriting your authentication tokens or zone flags every single time.
Urticas 👍 1 Selected: A
When you need to manage multiple Google Cloud accounts, regions, or zones using the gcloud CLI, the recommended approach is to use named configurations. Each configuration can store: Account credentials Project ID Default region Default zone This allows you to easily switch contexts without re‑specifying flags every time.
svij87 👍 1 Selected: A
A is correct option
Deepthi12 👍 1 Selected: A
A is correct
Shybi 👍 1 Selected: A
Option A. Keywords - Activate and list.
4ad26ef 👍 1 Selected: A
A is correct
BAofBK 👍 1
The correct answer is A
YourCloudGuru 👍 4 Selected: A
The correct answer is A This option allows you to create and activate different configurations for your GCP accounts. This way, you can easily switch between accounts and run commands without having to re-enter your credentials. The other options are not as good: Option B does not specify how to switch between accounts when running the commands to start the Compute Engine instances. Option C does not specify how to create configurations for your GCP accounts. * Option D does not specify how to start the Compute Engine instances.
Captain1212 👍 1
Yes A seems to be more correct
ExamsFR 👍 1 Selected: A
A is correct
Neha_Pallavi 👍 2
Yes A is the correct Answer. using the gcloud configurations,we can create the we need to run the another compute engine instance
Partha117 👍 1 Selected: A
A is correct
raselsys 👍 1 Selected: A
Correct answer is A.
Buruguduystunstugudunstuy 👍 7 Selected: A
Answer A is the correct answer. To start a new Compute Engine instance in different GCP accounts using the command line interface, you can create two configurations using gcloud config configurations create [NAME], where [NAME] is the name of the configuration for each account. Then, you can switch between accounts using gcloud config configurations and activate [NAME] before running the gcloud compute instances create command to create the instance. Answer B is incorrect because running gcloud configurations list only lists the available configurations and does not start Compute Engine instances. Answer C is incorrect because activating configurations using gcloud configurations activate [NAME] only switches the current configuration, but does not start Compute Engine instances. Answer D is incorrect because running gcloud configurations list only lists the available configurations and does not start Compute Engine instances.
ChristN 👍 1 Selected: A
A is correct.
PSS387 👍 1
A is correct answer
PKookNN 👍 1 Selected: A
a is correct
VarunGo 👍 1 Selected: A
A is correct bro!
RanjithK 👍 1
Answer is A
Alok17 👍 1
A is corect
AzureDP900 👍 1
A is right, similar question is part of Tutorials Dojo questions.
ybaqqioui 👍 1
A is correct
haroldbenites 👍 1
Go for A
theBestStudent 👍 6
Obviously A is correct. All the other options don't make any sense when day say "Run gcloud configurations list to start the Compute Engine instances". How the heck are you expecting to "start" GCE instances doing "configuration list". Obviously B,C,D don't make any sense.
jmugambi 👍 2 Selected: A
A is the only option. By elimination: B/C/D have "gcloud config" or 'gcloud configurations' as a way to create compute instances which is wrong. Right command begins with 'gcloud compute' Correct method: create configurations -> create instances in active config -> switch configuration -> create instances in newly active config
pranavdhopey 👍 1 Selected: A
A is correct
blackthorn_01 👍 1 Selected: C
https://cloud. google.com/sdk/gcloud/reference/config/configurations/activate
Skyone 👍 2 Selected: A
A is correct
test157 👍 2 Selected: A
A is the correct answer!
shawnkkk 👍 1
A. Create two configurations using gcloud config configurations create [NAME]. Run gcloud config configurations activate [NAME] to switch between accounts when running the commands to start the Compute Engine instances.
vishnukumartr 👍 2
A. Create two configurations using gcloud config configurations create [NAME]. Run gcloud config configurations activate [NAME] to switch between accounts when running the commands to start the Compute Engine instances.
Jaira1256 👍 1
A is correct
beginnercloud 👍 1
Correctly answer is A
YAS007 👍 1
A is correct https://medium.com/google-cloud/how-to-use-multiple-accounts-with-gcloud-848fdb53a39a
yvinisiupacuando 👍 1
I vote for A
gspb 👍 5
Obviously A is the correct option here. Even if u dont know this, u can eliminate the remaining options since by common sense u can say that the "list" command doesnt start but list the required things.
gspb 👍 2
Obviously A is the correct option here. Even if u dont now this u can eliminate he remaining options since by common sense u can say that the "list" command doesnt start but list the required things.
ApaMokus 👍 1
A is the correct anwer. B is inappropriate as list commend does not start VMs. C&D are incorrect as you cannot have two active configurations at a time.
sumanshu 👍 2
Vote for 'C' . A & B - out because they mention 'CREATING' the configurations. Why we need to re-create it? option D is out - command is wrong
Hi2ALL 👍 1
C is correct answer we need to focus "activate" EXAMPLES To activate an existing named configuration, run: gcloud config configurations activate my_config To list all properties in the activated configuration, run: gcloud config list --all
Rajesh_Arya 👍 1
Run gcloud config list to start the Compute Engine instances.-- list action will never start anything. so options B,C,D are ruled out straight away.
Hi2ALL 👍 1
C is acceptable
JackGlemins 👍 2
A is right:https://cloud.google.com/sdk/docs/configurations#activating_a_configuration
Vinod87 👍 1
A is the correct option
Sarin 👍 1
A is the correct option
GCP_Student1 👍 1
A. Create two configurations using gcloud config configurations create [NAME]. Run gcloud config configurations activate [NAME] to switch between accounts when running the commands to start the Compute Engine instances.
DucSiu 👍 1
Correct answer is A
d18mph23 👍 1
A is correct option gcloud configurations * command doesn't exist
Joh3o8an 👍 1
I think A is the correct answer. You can't start a compute engine with "gcloud config list" but rather to view the properties of your active configurations.
passnow 👍 1
That's right ..list does not start any thing..it only shows the options
INASR 👍 1
Correct answer is A. you need to create two configurations and then activate the one you want"named confguration) corresponds to where your instance is.
Conjoinix 👍 1
A is Correct Answer.
Sascha_Frei 👍 1
C - correct
krunals 👍 1
A is correct option as it contains right command gcloud config configurations activate All other options miss config keyword in command and hence easy to rule out
JKRowlings 👍 1
A seems to be the right answer. gcloud config list - list Cloud SDK properties for the currently active configuration and does not start the configuration. gcloud config configurations activate start an inactive configuration.
amitkumardube 👍 1
A looks the right answer.
robor97 👍 1
A correct for me based on command syntax
satish2010a 👍 1
Ans - A. Create two configurations using gcloud config configurations create [NAME]. Run gcloud config configurations activate [NAME] to switch between accounts when running the commands to start the Compute Engine instances.
swatititame 👍 1
• A. Create two configurations using gcloud config configurations create [NAME]. Run gcloud config configurations activate [NAME] to switch between accounts when running the commands to start the Compute Engine instances.
gcpace 👍 1
A is the correct option, only one configuration can be active at a time.
nwk 👍 1
Vote A https://cloud.google.com/sdk/gcloud/reference/config/configurations/activate
glam 👍 3
A. Create two configurations using gcloud config configurations create [NAME]. Run gcloud config configurations activate [NAME] to switch between accounts when running the commands to start the Compute Engine instances.
dtahil84 👍 1
There is command called gcloud config configurations activate so D is wrong. A is correct.
yas_cloud 👍 1
Should this not be A? Reason being option C, D talk about activating both configurations which is not possible. Option B talks about running a 'list'command to activate a configuration which wont happen.
cannonball0608 👍 1
there is no such command under google documentation. "gcloud configurations activate"
gh999l 👍 1
gcloud config configurations activate CONFIGURATION_NAME .. this is it / and its mentioned in option A . So is correct
XRiddlerX 👍 1
Are you implying that B,C,D are incorrect because "gcloud configurations activate" doesn't exist and that A is the only obvious choice? I'm not sure I understand your comment.
someoneinthecloud 👍 1
A is the correct answer here.
rambest 👍 1
Correct answer is A
professor 👍 1
A seems legit
cloudenthu01 👍 5
you cannot switch accounts without creating configuration which is created using gcloud config configurations create [CONFIGNAME] ....which has desired zone/regions/projects defined in them and then switch accounts using gcloud config configurations activate [CONFIGNAME] then run gcloud compute create instances [INSTANCES] which is created in region/zone by switching config accounts. Answer is A.
AnjuMaria 👍 2
gcloud config list will not start a compute engine instance. So B,C,D are incorrect. A is the correct answer.
poogcp 👍 1
Correct Answer is "A"
mlantonis 👍 2
A is the correct answer
saurabh1805 👍 2
A is correct answer, Please refer below document for more details. https://cloud.google.com/sdk/gcloud/reference/config/configurations#COMMAND
saurabh1805 👍 2
A is correct answer https://cloud.google.com/sdk/gcloud/reference/config/configurations#COMMAND
Khaled_Rashwan 👍 7
A is correct account information is saved in the "configurations". you can have more than one "configurations" but only one is active at a time. you can create two configurations and one for each account then switch between them using: gcloud config configurations activate. Also, you can change the account details in the active configurations using: gcloud config set core/account <account-name>
Agents89 👍 4
A is the correct answer
ankit89 👍 4
A is correct
leba 👍 38
Correct answer is A as you can create different configurations for each account and create compute instances in each account by activating the respective account.Refer GCP documentation - Configurations Create & Activate Options B, C & D are wrong as gcloud config configurations list does not help create instances. It would only lists existing named configurations.
ahmed812 👍 3
we cannot activate two configurations at a time. So A seems appropriate gcloud config configurations activate CONFIGURATION_NAME [GCLOUD_WIDE_FLAG …]
Bharathy 👍 1
I believe option c is correct...
coldpar 👍 28
A is the correct option

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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 using gcloud 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 using gcloud 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.

More ACE FAQ →

Related Analysis

Practice All ACE Questions

Access 84 questions with complete answers and detailed explanations.

View Full ACE Practice Test →

← Back to ACE Study Guide