How to change the project in gcp using cli command

2020-05-11 20:59发布

How can i change the current running project to another project in GCP (Google Cloud Platform) account using cli commands other than using gcloud init manually.

$gcloud projects list will list the projects running on my account. I want to change the current project to any other project from the list using a cli command.

13条回答
乱世女痞
2楼-- · 2020-05-11 21:53
gcloud config set project my-project

You may also set the environment variable $CLOUDSDK_CORE_PROJECT.

查看更多
登录 后发表回答