Skip to content

Instantly share code, notes, and snippets.

@ElijahLynn
Last active April 9, 2025 22:18
Show Gist options
  • Save ElijahLynn/f3e3f5e5db0249cd7c787fe5f11f5a16 to your computer and use it in GitHub Desktop.
Save ElijahLynn/f3e3f5e5db0249cd7c787fe5f11f5a16 to your computer and use it in GitHub Desktop.
How to set the zone for the gcloud cli tool
# sets the default zone for your gcloud CLI. It means it will apply to all your future gcloud commands coming from that same terminal.
gcloud config set compute/zone <zone>
# default value for this specific project only.
gcloud compute project-info add-metadata --metadata google-compute-default-zone=<zone>
# https://www.reddit.com/r/googlecloud/comments/brshdg/how_to_set_correctly_default_zoneregion_via_gcloud/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment