gcloud init documentation code example
Example 1: gcloud init
gcloud init: Initialize, authorize, and configure the gcloud tool.
gcloud version: Display version and installed components.
gcloud components install: Install specific components.
gcloud components update: Update your Cloud SDK to the latest version.
gcloud config set project: Set a default Google Cloud project to work on.
gcloud info: Display current gcloud tool environment details.
Example 2: gcloud init
gcloud init [--console-only] [--skip-diagnostics] [GCLOUD_WIDE_FLAG …]
DESCRIPTION
gcloud init launches an interactive Getting Started workflow for the gcloud command-line tool. It performs the following setup steps:
Authorizes gcloud and other SDK tools to access Google Cloud Platform using your user account credentials, or from an account of your choosing whose credentials are already available.
Sets up a new or existing configuration.
Sets properties in that configuration, including the current project and optionally, the default Google Compute Engine region and zone you'd like to use.