Medium1 markMultiple Choice
GCP ACE · Question 07 · Domain 1.3: Installing and configuring the CLI
You are a developer working on two different GCP projects: 'project-dev' and 'project-prod'. You want to easily switch between these environments in your local Cloud SDK without having to re-authenticate or manually change the project ID every time.
Which TWO gcloud commands are essential for setting up and switching between these environments? (Select TWO)
You are a developer working on two different GCP projects: 'project-dev' and 'project-prod'. You want to easily switch between these environments in your local Cloud SDK without having to re-authenticate or manually change the project ID every time.
Which TWO gcloud commands are essential for setting up and switching between these environments? (Select TWO)
Answer options:
A.
gcloud config configurations create
B.
gcloud init --switch
C.
gcloud config configurations activate
D.
gcloud projects switch
E.
gcloud auth application-default login
How to approach this question
Recall how gcloud manages multiple environments using 'configurations'.
Full Answer
gcloud config configurations create, gcloud config configurations activate
The gcloud CLI uses 'configurations' to manage multiple sets of properties. You use `gcloud config configurations create [NAME]` to make a new one, set its properties (like project), and then use `gcloud config configurations activate [NAME]` to switch between them seamlessly.
Common mistakes
Trying to use non-existent commands like `gcloud projects switch`.
Practice the full GCP Associate Cloud Engineer Practice Exam 2
50 questions · hints · full answers · grading
More questions from this exam
Q01Your company is migrating to Google Cloud and needs to establish a resource hierarchy. You have t...EasyQ02You are managing access to a GCP project. You need to grant 15 developers the ability to view Com...MediumQ03You have created a new GCP project using the Cloud Console. You want to deploy a Cloud Function u...EasyQ04Your startup has a strict monthly cloud budget of $500. You want to be notified immediately if yo...EasyQ05Your finance team wants to perform complex SQL analysis on your GCP billing data to understand co...Medium
Expert