google-cloud-platform - 如何使用 CLI 命令更改 GCP 中的项目

标签 google-cloud-platform command-line-interface gcloud

如何使用 cli 命令(而不是使用 gcloud init)将当前正在运行的项目更改为 GCP(Google Cloud Platform)帐户中的另一个项目手动?

gcloud items list 将列出我的帐户上运行的项目。我想使用 cli 命令将当前项目更改为列表中的任何其他项目。

最佳答案

gcloud config set project $MY_PROJECT_ID

#=>

Updated property [core/project].

您还可以设置环境变量$CLOUDSDK_CORE_PROJECT

关于google-cloud-platform - 如何使用 CLI 命令更改 GCP 中的项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46770900/

相关文章:

jenkins - Kubernetes 上 Jenkins 从属设备的连接已断开

google-cloud-platform - Google Cloud Run的默认存储是什么?

powershell - 如何从终端执行当前目录中的powershell代码?

tomcat - Google Load-balancer 对后端的请求随机失败

php - 让 pdo_mysql 驱动程序在 CLI 中工作

c++ - Minimax井字游戏(4x4)悬挂式

gitlab - Git 推/拉在 Google Compute Engine 中的 GitLab 上失败

django - Gcloud 应用部署失败使用 python+django+gunicorn + worker 启动失败

git - 使用 gcloud init 时出错

google-cloud-platform - GCP 说 "Compute Engine API has not been used in project"但它已经启用