How to use the gcloud CLI
Manage your Google Cloud projects and applications with the gcloud
command line tool.
๐ Projects
List projects.
gcloud projects list
Set active project.
gcloud config set project ${GOOGLE_CLOUD_PROJECT_ID}
Get active project.
gcloud config get-value project
๐ค Service accounts
Use service accounts to access APIs like Dialogflow.
List service accounts.
gcloud iam service-accounts list
View the properties of a particular service account.Service account emails look like this: ${SERVICE_ACCOUNT_NAME}@${GOOGLE_CLOUD_PROJECT_ID}.iam.gserviceaccount.com
gcloud iam service-accounts describe ${SERVICE_ACCOUNT_EMAIL}
List keys of a service account.
gcloud iam service-accounts keys list --iam-account=${SERVICE_ACCOUNT_EMAIL}