1 Answers
Ah, yes! Good question, actually. The key thing here is that Cloud Shell, by default, is configured to store gcloud settings under /tmp/–which means that they will get cleaned up when your Cloud Shell instance is reset. To explore this further, you can run gcloud info
or more specifically gcloud info | grep -i config
. Here’s an example:
User Config Directory: [/tmp/tmp.zwBf8qMxlC]
Active Configuration Name: [cloudshell-22921]
Active Configuration Path: [/tmp/tmp.zwBf8qMxlC/configurations/config_cloudshell-22921]
To change this, though–and make gcloud act more like it would on a normal (i.e. non-CloudShell) installation–you can set the CLOUDSDK_CONFIG
environment variable. For example, by running this:
CLOUDSDK_CONFIG=~/.config/gcloud
And for your last question, the easiest way to list the properties currently set in your active configuration is with gcloud config list
, but I talk more about this (including an alternative) in the "Rundown on gcloud" lecture.
I hope this helps!
Mattias