Using Google Cloud SDK CLI Tools for managing GCP resources

From PUBLIC-WIKI
Revision as of 14:56, 11 March 2019 by Eyales (talk | contribs) (Created page with "== How to install Google Cloud SDK (Windows Platform) == * Login to the machine using privileged account. * Install Google Cloud SDK, as instructed below: : https://cloud.goog...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

How to install Google Cloud SDK (Windows Platform)

  • Login to the machine using privileged account.
  • Install Google Cloud SDK, as instructed below:
https://cloud.google.com/sdk/docs/quickstart-windows
  • 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:
https://cloud.google.com/sdk/docs/quickstart-redhat-centos
  • 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