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
  • 57,590
  • 26
  • 140
  • 166
Mohammad
  • 775
  • 1
  • 14
  • 37

2 Answers2

5

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
  • 297,357
  • 32
  • 422
  • 441
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
  • 3,482
  • 1
  • 11
  • 23
  • 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