Gcloud Config Configurations CLI Command

January 9, 2022
Tags:
google

We'll cover the gcloud config configurations command. It can be used to switch between google projects quickly.

Gcloud Config Cheatsheet

List

gcloud config configurations list

Create dev configuration

gcloud config configurations create dev
gcloud config set project demo-dev-111111
gcloud config set account me@email.com
gcloud config set compute/region us-central1
gcloud config set compute/zone us-central1-b

Create prod configuration

gcloud config configurations create prod
gcloud config set project demo-prod-222222
gcloud config set account me@email.com
gcloud config set compute/region us-central1
gcloud config set compute/zone us-central1-b

Activate different configurations

gcloud config configurations activate dev
gcloud config configurations activate prod

Config Files Themselves

~/.config/gcloud/active_config
~/.config/gcloud/configurations/config_dev
~/.config/gcloud/configurations/config_prod

Test

gcloud compute instances list

Links

Get full access to these great resources

All for less than the price of coffee a day

27 courses
184 lessons
28+ hours

Get started with BoltOps Learn now and get access to easy and powerful lessons

BoltOps Tools