Skip to content

Instantly share code, notes, and snippets.

@kendru
Created August 27, 2019 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kendru/1130e662a8638894552b2ce11200f5e2 to your computer and use it in GitHub Desktop.
Save kendru/1130e662a8638894552b2ce11200f5e2 to your computer and use it in GitHub Desktop.
Configuring a gcloud profile

Configuring a gcloud profile

  1. Create a new profile:
luther:~ ameredith$ gcloud config configurations create my-profile
Created [my-profile].
Activated [my-profile].
  1. Authenticate with Google
luther:~ ameredith$ gcloud auth login
...
You are now logged in as [user@example.com].
Your current project is [None].  You can change this setting by running:
  $ gcloud config set project PROJECT_ID
  1. Set the project
luther:~ ameredith$ gcloud config set project my-project
Updated property [core/project].
  1. Set the default region and zone (optional)
luther:~ ameredith$ gcloud config set compute/region us-central1
Updated property [compute/region].
luther:~ ameredith$ gcloud config set compute/zone us-central1-a
Updated property [compute/zone].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment