创建配置(这也会激活它):
gcloud config configurations create <cool_new_config>gcloud config set project <project>安装direnv。把它挂进你的壳里。对于 bash,我使用~/.bash_profile而不是定向~/.bashrc。
导航到您想要进行切换的项目文件夹。
export CLOUDSDK_ACTIVE_CONFIG_NAME=<cool_new_config> direnv allow验证功能:
gcloud config configurations list可选:重建其余配置
gcloud config configurations list gcloud config configurations describe <default>gcloud auth logingcloud config set compute/region <us-central1>gcloud config set compute/zone <us-central1-a>