How to change the project in GCP using CLI commands

0 votes
How can I switch the active project in my GCP (Google Cloud Platform) account to a different project using cli commands rather than manually doing gcloud init?

The projects that are active on my account are listed in the gcloud projects list. I want to use a cli command to switch the active project to any other project in the list.
Nov 3 in GCP by Ashwini
• 2,760 points
52 views

1 answer to this question.

0 votes
gcloud config set project $MY_PROJECT_ID

#=>

Updated property [core/project].

You may also set the environment variable $CLOUDSDK_CORE_PROJECT

answered Nov 4 by Tejashwini
• 2,860 points

Related Questions In GCP

0 votes
1 answer

How to change the project in GCP using CLI command?

Hi@akhtar, If you configured GCP SDK in your ...READ MORE

answered Sep 13, 2020 in GCP by MD
• 95,380 points
1,223 views
0 votes
1 answer

How to create a new project in GCP using the command line?

Hi@akhtar, You need to configure GCP SDK in ...READ MORE

answered Nov 9, 2020 in GCP by MD
• 95,380 points
457 views
0 votes
1 answer

How to set the project property in the core section in GCP?

Hi@akhtar, The gcloud config set command sets the specified ...READ MORE

answered Nov 9, 2020 in GCP by MD
• 95,380 points
538 views
0 votes
1 answer

What are the service accounts in GCP? How to create one?

The special accounts associated with a project are called the Service Accounts. The ...READ MORE

answered Oct 9, 2019 in GCP by Sirajul
• 59,190 points
334 views
0 votes
0 answers
0 votes
1 answer

In GCP, how to list all the resources running under project?

For a specific organization, folder, or project, ...READ MORE

answered Nov 10 in GCP by Ashwini
• 2,760 points
96 views
0 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Using the Google Cloud Platform SDK CLI to List all Active Resources Under a Given Project

For a specific organization, folder, or project, ...READ MORE

answered Nov 7 in GCP by Tejashwini
• 2,860 points
51 views
0 votes
1 answer

Remote Desktop connect to Ubuntu in GCP

The instructions below can be used to ...READ MORE

answered Nov 4 in GCP by Tejashwini
• 2,860 points
61 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP