Em Ae
Em Ae

Reputation: 8704

How to configure multiple gcloud projects

On my work laptop, i have gcloud configured with our prod projects. when i do gcloud config configurations list, I get only one row in result, which is ACTIVE and it's my work-project.

Now for some personal testing, I have created a separate project which is associated with my personal email id. How would i configure/connect this project with my gcloud cli?

I have tried

So how can i connect my personal google projects to the same gcloud which is connected to my work-prod projects. Is it even possible?

Upvotes: 4

Views: 6348

Answers (1)

guillaume blaquiere
guillaume blaquiere

Reputation: 75745

You are mixing 2 things:

  • Configuration set up in your Gcloud sdk
  • The project list that you have access

You can have several Gcloud config profile for easily switching from 1 configuration to another one. Use gcloud init to start the config. You could override the current config or define a new one. Then, you could perform gcloud config configurations activate <config Name> to switch between your configurations

For listing the projects of which your current user have access, use the command gcloud projects list

Here you can also find a more detailed tutorial about how to configure Google Cloud SDK for multiple projects that may be helpful to you.

Upvotes: 9

Related Questions