LinuxCommandLibrary

gcloud-config-set

Set a property in the Google Cloud CLI configuration.

TLDR

Set the project property in the core section

$ gcloud config set project [project_id]
copy


Set the compute zone for future operations
$ gcloud config set compute/zone [zone_name]
copy


Disable prompting to make gcloud suitable for scripting
$ gcloud config set disable_prompts true
copy


View the list of properties currently in use
$ gcloud config list
copy


Unset a previously set property
$ gcloud config unset [property_name]
copy


Create a new configuration profile
$ gcloud config configurations create [configuration_name]
copy


Switch between different configuration profiles
$ gcloud config configurations activate [configuration_name]
copy

Copied to clipboard