0

I would like to deploy an application (as a container image) to Google Cloud Run. I am following the documentation as below:

https://cloud.google.com/run/docs/quickstarts/build-and-deploy

I would like to set the region as Tokyo (asia-northeast1) for the following commands:

gcloud builds submit

gcloud run deploy

The reason is that Cloud Run and Cloud Storage costs depends on the region. I would like to set the location of Cloud Storage and Cloud Run.

desertnaut
  • 52,940
  • 19
  • 125
  • 157
Mohammad
  • 347
  • 4
  • 19

2 Answers2

3

When creating a service in Cloud Run Console there's a region dropdown in Service setting see the image below :

image

you can also use the gcloud command to specify the region:

gcloud run deploy --image gcr.io/PROJECT-ID/DOCKER --platform managed --region=asia-northeast1
JM Gelilio
  • 2,960
  • 1
  • 8
  • 20
  • Thank you for your help. What about Cloud Storage (where the container is saved?) – Mohammad Oct 20 '20 at 01:28
  • 1
    It seems your question and concern are similar to @DougStevenson [question](https://stackoverflow.com/q/60982068/14356364). Have you visited the question and the [answer](https://stackoverflow.com/a/60983361/14356364) – JM Gelilio Oct 20 '20 at 02:07
3

Setting the Cloud Run deployment region prior to deployment with gcloud is covered in the documentation:

Optionally, set your platform and default Cloud Run region with the gcloud properties to avoid prompts from the command line:

gcloud config set run/platform managed
gcloud config set run/region REGION

replacing REGION with the default region you want to use.

Doug Stevenson
  • 268,359
  • 30
  • 341
  • 380