如何在 Google Cloud Platform CLI - Cloud Shell 中切换配置

How to Switch between Configurations in Google Cloud Platform CLI - Cloud Shell

我通过 gcloud init 命令创建了多个 configurations。如何在 Google Cloud Shell (CLI) 中的 configurations 之间切换?

您应该能够:

  • gcloud config configurations list;
  • gcloud config configurations activate ...
  • 等等

参见:https://cloud.google.com/sdk/gcloud/reference/config/configurations

NOTE Instead of changing the current config globally, you may also explicitly specify the configuration per command,e.g.:

gcloud [some-command] --configuration=[your-config]