ASSOCIATE-CLOUD-ENGINEER · Question #228
ASSOCIATE-CLOUD-ENGINEER Question #228: Real Exam Question with Answer & Explanation
The correct answer is B: Use the command gcloud auth activate-service-account and point it to the private key. Authorizing with a service account gcloud auth activate-service-account authorizes access using a service account. As with gcloud init and gcloud auth login, this command saves the service account credentials to the local system on successful completion and sets the specified acc
Question
You received a JSON file that contained a private key of a Service Account in order to get access to several resources in a Google Cloud project. You downloaded and installed the Cloud SDK and want to use this private key for authentication and authorization when performing gcloud commands. What should you do?
Options
- AUse the command gcloud auth login and point it to the private key
- BUse the command gcloud auth activate-service-account and point it to the private key
- CPlace the private key file in the installation directory of the Cloud SDK and rename it to
- DPlace the private key file in your home directory and rename it to
Explanation
Authorizing with a service account gcloud auth activate-service-account authorizes access using a service account. As with gcloud init and gcloud auth login, this command saves the service account credentials to the local system on successful completion and sets the specified account as the active account in your Cloud SDK configuration. https://cloud.google.com/sdk/docs/authorizing#authorizing_with_a_service_account
Community Discussion
No community discussion yet for this question.