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
Google Console Guides
1h 54m
Explore lesson as part of a learning path
Get full access to these great resources
All for less than the price of coffee a day