Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the active configuration profile in gcloud?

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?

like image 694
ezain Avatar asked Mar 02 '16 10:03

ezain


People also ask

How do I change my active configuration on gcloud?

gcloud config list will always show you the properties in your active configuration. To change the active configuration for all commands in your current terminal, you can set the environment variable CLOUDSDK_ACTIVE_CONFIG_NAME to the name of the configuration you'd like to use.

How do I access gcloud config?

Below is the gcloud info output on my environment, as you can see the configuration files are in User Config Directory: section. In this particular case, you can run gcloud info | grep 'User Config' to list the location of the config files, regardless if you custom install it or not.

How can I change gcloud CLI project?

Check the available projects by running: gcloud projects list . This will give you a list of projects which you can access. To switch between projects: gcloud config set project <project-id> . Show activity on this post.


1 Answers

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
like image 149
cherba Avatar answered Oct 19 '22 12:10

cherba