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

Kee*_*asa 1 google-cloud-platform gcloud google-cloud-shell

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

Daz*_*kin 7

你应该能够:

  • gcloud config configurations list;
  • gcloud config configurations activate ...
  • ETC。

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

注意您也可以显式指定每个命令的配置,而不是全局更改当前配置,例如:

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