Changing the default region or zone

This page explains how to set a defaultregion or zone for your Google Cloud consoleproject.

When you make a request to Compute Engine, you might be required toprovide a region or a zone depending on the specific requirements of yourrequest. Any request involvingregionalresources requires that you supply a region name, and any request involvingzonalresources requires that you supply a zone name. For example, you must specifya region when you create a static external IP address, and you must specifya zone when you create a virtual machine (VM) instance.

When you create a project, Compute Engine automatically selectsa default region and zone based on the location from which you create theproject. Compute Engine attempts to pick a region and azone that are close to where the project originates so that resources youcreate have reduced latency to your customers or clients. If you want tocreate resources in a different region or zone, you can override the defaultselection.

For more information about regions and zones, seeRegions and zones.

For more information about global, regional, and zonal Compute Engineresources, seeGlobal, regional, and zonal resources.

Before you begin

How a default region and zone affect your project

The default region and zone settings affect only client tools, such as theGoogle Cloud CLI and the Google Cloud console. When you use these tools toconstruct your requests, the tools help you manage resources by automaticallyselecting the default region and zone.

When you use the Google Cloud console to create regional or zonal resourceslike addresses and instances, Compute Engine sets the region and zonefields for you. You can accept the pre-populated values or explicitly changeone or both of the values.

When you use the gcloud CLI, omit setting the--region and--zone flags to use the default region and zone properties for the newproject.

You can always change the default region and zone settings in the metadataserver, override the default region and zone locally for thegcloud CLI, or override the settings manually for each requestby using either the gcloud CLI or the Google Cloud console.

Looking up the default region or zone

The metadata server contains metadata information about a project, includingthe project ID and project name. You can query the metadata server to getand use information about the project.

If you specify a default region and zone for your project, thenCompute Engine sets these values in themetadata server for your project.

Default regions and zones are set by using the following values:

  • google-compute-default-region
  • google-compute-default-zone

To see what your default region and zone settings are, run the followinggcloud command, replacingPROJECT_ID with your project ID:

gcloud compute project-info describe --projectPROJECT_ID

Look for the default region and zone metadata values in the response. If thegoogle-compute-default-region andgoogle-compute-default-zonekeys and values are missing from the response, that means no default regionor zone is set.

Changing the default region or zone

There are no restrictions on which regions or zones you can set for your default properties. For example, it is possible to set a default zone that is outside of your default region. Check the default region and zone settings when creating and managing your resources.

Console

To change your default region or zone, follow these steps:

  1. In the Google Cloud console, go to theSettings page.

    Go to Settings

  2. From theRegion drop-down menu, select a default region.

  3. From theZone drop-down menu, select a default zone.

  4. ClickSave.

gcloud

You can change the default region and zoneby making a request to themetadata server. For example:

gcloud compute project-info add-metadata \    --metadata google-compute-default-region=europe-west1,google-compute-default-zone=europe-west1-b

After you update the default metadata by using any method, run thegcloud init command to reinitialize yourdefault configuration.The gcloud CLI refreshes the default region and zone settingsonly after you run thegcloud init command.

For more information about using the gcloud CLI options to set defaultregions and zones, seeSet default properties.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.