Using Google Cloud SDK CLI Tools for managing GCP resources
How to install Google Cloud SDK (Windows Platform)
- Login to the machine using privileged account.
- Install Google Cloud SDK, as instructed below:
- Run the following from command prompt to initialize the Cloud SDK:
- gcloud init --console-only
- Select a GCP project from the list
- Select a default Compute region and zone
How to install Google Cloud SDK (RHEL / CentOS Platform)
- Login to the machine using privileged account.
- Install Google Cloud SDK, as instructed below:
- Run the following command to initialize the Cloud SDK:
- gcloud init --console-only
- Select a GCP project from the list
- Select a default Compute region and zone
Common PowerShell commands for GCP
- Login to Google Cloud Platform:
- gcloud auth login --no-launch-browser
- List all active GCP accounts:
- gcloud auth list
- Change the active account:
- gcloud config set account <Account_Name>
- Note: Replace <Account_Name> with the target GCP account
- Lists all available GCP projects:
- gcloud projects list
- Change the GCP project:
- gcloud config set project “<Project_ID>”
- Note: Replace <Project_ID> with the target GCP project ID