How to change the active configuration profile in gcloud?

ezain picture ezain · Mar 2, 2016 · Viewed 29.3k times · Source

I have created a new configuration profile using command:

gcloud init 

and now I don't know how to switch to old configuration profile without override it.

Using gcloud config I can't switch to another configuration only set a property of the current configuration.

any idea?

Answer

cherba picture cherba · Mar 2, 2016

You can see your configurations (created via gcloud init) via

gcloud config configurations list

You can switch to a different configuration via

gcloud config configurations activate MY_OLD_CONFIG

Once activated you can

gcloud config list

to see its settings.

You can also do this without activation by running

gcloud config list --configuration CONFIGURATION_NAME