Skip to content

Instantly share code, notes, and snippets.

@robcowie
Created April 20, 2020 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robcowie/7cf8528fdc78c488f63de5dedee4b064 to your computer and use it in GitHub Desktop.
Save robcowie/7cf8528fdc78c488f63de5dedee4b064 to your computer and use it in GitHub Desktop.
gcloud named configurations

Manage Local GCP Config

To see help for gcloud named configurations

gcloud topic configurations

To list & describe configurations

gcloud config configurations list
gcloud config configurations describe <name>

To activate a configuration

gcloud config configurations activate <name>

export CLOUDSDK_ACTIVE_CONFIG_NAME=<name>

gcloud --configuration <name>

To create a new named configuration

gcloud init

To set a property

gcloud config configurations activate <name>

gcloud config set compute/region europe-west1
gcloud config set functions/region europe-west1
gcloud config set run/region europe-west1

Example setup

gcloud config configurations activate adi-prod
gcloud config set functions/region europe-west1
gcloud config set run/region europe-west1
gcloud config set core/account rob.cowie@nozzle.ai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment