Technically, it is not possible to change the name of that configuration using the gcloud
command.
However, you can change it doing this little workaround:
gcloud config configurations activate [YOUR_CONFIG_NAME]
to activate the configuration you wish. gcloud info --format='get(config.paths.active_config_path)'
to find the directory where your configurations are stored. You will get the path of the file of that specific configuration, looking like this /tmp/tmp.XAfddVDdg/configurations/[YOUR_CONFIG_NAME]
cd
into the directory /tmp/tmp.XAfddVDdg/configurations/
, you will find all your configurations there. Every configuration will be named there like this config_[YOUR_CONFIG_NAME]
. Modifying the part that matches the name of your configuration will successfully change its name. DO NOT delete the config_
part of the name. gcloud config configurations list
, you will find your configuration renamed, but none will be active now. Just activate it with gcloud config configurations activate [YOUR_CONFIG_NAME]
, and you will be good to go.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.