gcloud set project code example

Example 1: gcloud set project

gcloud config set project 

Example 2: gco switch project concole

gcloud config set project my-project

Example 3: gcloud create new project and set it as default

gcloud projects create black-butterfly-4450 \
  --name black-butterfly \
  --set-as-default

Example 4: gcloud set project

gcloud config set project my-project

Example 5: gcloud set project

gcloud auth list
* account 1
  account 2

# change 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`

Tags: