Setting location in Google Cloud CLI

When I deploy to App Engine using the command line I get this message (as an example for cron.yaml)

 

Updating config [cron].../WARNING: We are using the App Engine app location (europe-west3) as the default location. Please use the "--location" flag if you want to use a different location.

 

What I want to do is to set the default location I'm working on. In my case it's europe-west3.

I tried this with the following command but it's not valid and I also don't think it's relevant (compute?).

 

$ gcloud config set compute/zone europe-west3
WARNING: europe-west3 is not a valid zone. Run `gcloud compute zones list` to get all zones.

 

So, how do I set the zone in the command line interface?

Solved Solved
2 2 370
1 ACCEPTED SOLUTION

Hello @John8543855,

Note that using gcloud compute lets you manage Compute Engine resources. 

You are using a region instead of a zone, that's why the warning says that europe-west3 is not a valid zone. Take a look at this documentation: Regions and zones. regions have three or more zones. For example, us-west1 is a region that has three zones: us-west1-aus-west1-b, and us-west1-c.

To set the default region and zone in your local client, you can run the following commands:

gcloud config set compute/region REGION
gcloud config set compute/zone ZONE

Running the command below lists all the valid zones.

gcloud compute zones list

If the above options don't work, you can contact Google Cloud Support to further look into your case. Hope it helps, thanks!

View solution in original post

2 REPLIES 2

Hello @John8543855,

Note that using gcloud compute lets you manage Compute Engine resources. 

You are using a region instead of a zone, that's why the warning says that europe-west3 is not a valid zone. Take a look at this documentation: Regions and zones. regions have three or more zones. For example, us-west1 is a region that has three zones: us-west1-aus-west1-b, and us-west1-c.

To set the default region and zone in your local client, you can run the following commands:

gcloud config set compute/region REGION
gcloud config set compute/zone ZONE

Running the command below lists all the valid zones.

gcloud compute zones list

If the above options don't work, you can contact Google Cloud Support to further look into your case. Hope it helps, thanks!

Thank you. I set the region and the warning message no longer appears.