
Answer-first summary for fast verification
Answer: Run gcloud auth login, enter your login credentials in the dialog window, and paste the received login token to gcloud CLI., Run gcloud config set project $my_project to set the default project for gcloud CLI.
To list the existing instances of your company on Google Cloud using the gcloud CLI, you need to perform the following steps: Firstly, you need to authenticate your account to ensure you have the necessary permissions. This can be done by running `gcloud auth login`, entering your login credentials in the dialog window, and pasting the received login token to gcloud CLI (Option A). Secondly, it is crucial to set the default project using `gcloud config set project $my_project` so that subsequent commands are executed within the intended project's context (Option E). Both steps are essential before listing instances in Google Cloud Platform: proper authentication for permissions and setting the default project to ensure the commands run in the correct project context.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
After installing the Google Cloud CLI on your new corporate laptop, you need to ensure that you are properly authenticated and that the correct project is set before listing your company's existing instances on Google Cloud. What steps must you take prior to running the gcloud compute instances list command? (Choose two.)
A
Run gcloud auth login, enter your login credentials in the dialog window, and paste the received login token to gcloud CLI.
B
Create a Google Cloud service account, and download the service account key. Place the key file in a folder on your machine where gcloud CLI can find it.
C
Download your Cloud Identity user account key. Place the key file in a folder on your machine where gcloud CLI can find it.
D
Run gcloud config set compute/zone $my_zone to set the default zone for gcloud CLI.
E
Run gcloud config set project $my_project to set the default project for gcloud CLI.
No comments yet.