title: How can I specify a region for the Cloud Storage buckets used by Cloud Build for a Cloud Run deployment?
body: <p>When deploying a docker container image to Cloud Run, I can choose a region, which is fine.  Cloud Run delegates the build to Cloud Build, which apparently creates two buckets to make this happen.  The unexpected behavior is that buckets aren't created in the region of the Cloud Run deployment, and instead default to multi-region US.</p>
  
  <p><strong>How do I specify the region as "us-east1" so the cost of storage is absorbed by the "always free" tier?</strong>  (Apparently US multi-region storage buckets store data in regions outside of the free tier limits, which resulted in a surprise bill - I am trying to avoid that bill.)</p>
  
  <p>If it matters, I am also using Firebase in this project.  I created the Firebase default storage bucket in the us-east1 region with the hopes that it might also become the default for other buckets, but this is not so.  The final bucket list looks like this, where you can see the two buckets created automatically with the undesirable multi-region setting.</p>
  
  <p><a href="https://i.stack.imgur.com/MRS5H.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MRS5H.png" alt="enter image description here"></a></p>
  
  <p>This is the shell script I'm using to build and deploy:</p>
  
  <pre class="lang-sh prettyprint-override"><code>#!/bin/sh
  
  project_id=$1
  service_id=$2
  
  if [ -z "$project_id" ]; then
      echo "First argument must be the Google Cloud project ID" &gt;&amp;2
      exit 1
  fi
  
  if [ -z "$service_id" ]; then
      echo "Second argument must be the Cloud Run app name" &gt;&amp;2
      exit 1
  fi
  
  echo "Deploying $service_id to $project_id"
  
  tag="gcr.io/$project_id/$service_id"
  
  gcloud builds submit \
      --project "$project_id" \
      --tag "$tag" \
  &amp;&amp; \
  gcloud run deploy "$service_id" \
      --project "$project_id" \
      --image "$tag" \
      --platform managed \
      --update-env-vars "GOOGLE_CLOUD_PROJECT=$project_id" \
      --region us-central1 \
      --allow-unauthenticated
  </code></pre>