How to change the project in GCP using CLI commands

前端 未结 16 1732
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-29 18:07

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

16条回答
  •  心在旅途
    2021-01-29 19:00

    Make sure you are authenticated with the correct account:

    gcloud auth list
    * account 1
      account 2
    

    Change to the project's account if not:

    gcloud config set account `ACCOUNT`
    

    Depending on the account, the project list will be different:

    gcloud projects list
    
    - project 1
    - project 2...
    

    Switch to intended project:

    gcloud config set project `PROJECT ID`
    

提交回复
热议问题