How can i change the current running project to another project in GCP (Google Cloud Platform) account using cli commands other than using
For what its worth if you have a more than a handful of projects, which I do, use:
gcloud init
This will list all your projects and give you the option to change current project settings, add a new project configuration or switch:
Pick configuration to use:
[1] Re-initialize this configuration [esqimo-preprod] with new settings
[2] Create a new configuration
[3] Switch to and re-initialize existing configuration: [default]
[4] Switch to and re-initialize existing configuration: [project 1]
[5] Switch to and re-initialize existing configuration: [project 2]
Please enter your numeric choice:
It will always ask you to login and display options for different google accounts that you may have.
Given that I manage multiple organisations and projects this approach lets' me to simply switch between them.