Associate Cloud Engineer practice question · Setting up a cloud solution environment
A consultant works on several client projects. Each client uses a different Google account, project, and default Compute…
A consultant works on several client projects. Each client uses a different Google account, project, and default Compute Engine zone. The consultant wants to switch all of these gcloud CLI settings at once when moving from one client to another. What should they use?
- ACreate a named gcloud configuration per client and switch with gcloud config configurations activate
- BRun gcloud auth login with the client's account each time they change clients
- CExport the CLOUDSDK_CORE_PROJECT environment variable for each client's project
- DRun gcloud auth application-default login for each client's account
Show the answer and explanation
Correct answer: A) Create a named gcloud configuration per client and switch with gcloud config configurations activate
Named gcloud configurations each hold a full set of CLI properties (account, project, default zone/region). Running gcloud config configurations activate switches all of them in one step.
Why each option is right or wrong
- A) Correct. A configuration is a named set of gcloud CLI properties, such as the active account, project ID and default zone/region. Activating a configuration makes all of its properties take effect in one step.
- B) Incorrect. gcloud auth login authorizes an account and sets it as the active account. It does not change the project or the default zone, so the consultant would still have to reset those by hand.
- C) Incorrect. This variable only overrides the project property. The active account and default zone stay the same, so the full client context is not switched.
- D) Incorrect. This command sets Application Default Credentials, which client libraries and applications use. It does not change the gcloud CLI's active project or default zone, and it does not change the CLI's active account.
- Exam domain
- Setting up a cloud solution environment · ~20% of Associate Cloud Engineer
- Question type
- Multiple choice (one answer)
Related Associate Cloud Engineer questions
- A developer wants their custom dotfiles and small utility scripts to stay available in later Cloud Shell sessions…Setting up a cloud solution environment
- A team wants to quickly launch a ready-made, vendor-packaged software solution, such as a common CMS stack, on Google…Setting up a cloud solution environment
- A retailer on Google Cloud Enhanced Support finds that checkout on its production web store, which runs on generally…Setting up a cloud solution environment
- A developer reads that a new Compute Engine flag is now available at the Beta launch stage.Setting up a cloud solution environment
All 60 free Associate Cloud Engineer questions by domain · 15 sample questions on one page
Practise the full Associate Cloud Engineer exam
This question is one of a small free sample from the CertRidge Associate Cloud Engineer bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.
Original question written from the official exam guide. Not affiliated with Google Cloud; never copied from the real exam.