
Answer-first summary for fast verification
Answer: Execute `gcloud config configurations list` to view existing configurations and then `gcloud config configurations activate` to switch to the desired one.
The correct answer is **A** because `gcloud config configurations list` allows you to check for existing configurations, and `gcloud config configurations activate` enables you to switch to the desired configuration efficiently. Options **C** and **D** are incorrect as they refer to invalid commands. Option **B**, while a valid command, does not directly address the need to identify and activate specific configurations, making it less efficient for this scenario. The `gcloud auth login` command is used to authorize gcloud to access the Cloud Platform with Google user credentials, which is not the solution to the problem at hand.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You've been working with a coworker to set up various gcloud configurations. However, you've realized that your commands are being executed against the wrong project. As a newcomer to the company, you're not yet familiar with all the project names. What is the most efficient method to switch to the correct configuration with the least number of steps?
A
Execute gcloud config configurations list to view existing configurations and then gcloud config configurations activate to switch to the desired one.
B
Use gcloud auth login to re-authenticate and select the correct configurations upon logging in.
C
Run gcloud configurations list followed by gcloud configurations activate.
D
Perform gcloud config list followed by gcloud config activate.