Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Region or Location when deploying to Cloud Run?

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.

like image 642
Mohammad Avatar asked Oct 23 '25 15:10

Mohammad


2 Answers

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.

like image 87
Doug Stevenson Avatar answered Oct 26 '25 07:10

Doug Stevenson


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
like image 35
JM Gelilio Avatar answered Oct 26 '25 07:10

JM Gelilio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!