# \[BUG\] AI Studio Cloud Run Publisher hardcodes us-west1 for DomainMapping, violating org policy

**URL:** <https://discuss.ai.google.dev/t/bug-ai-studio-cloud-run-publisher-hardcodes-us-west1-for-domainmapping-violating-org-policy/187184>\
**Category:** Google AI Studio\
**Tags:** ai-studio, bug\
**Created:** [October 6, 2026, 5:14pm UTC](https://discuss.ai.google.dev/t/bug-ai-studio-cloud-run-publisher-hardcodes-us-west1-for-domainmapping-violating-org-policy/187184 "2026-10-06T17:14:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dominik\_Helleberg](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/dominik_helleberg/32/155376_2.png) [@Dominik\_Helleberg](https://discuss.ai.google.dev/u/Dominik_Helleberg)\
**Post date:** [October 6, 2026, 5:14pm UTC](https://discuss.ai.google.dev/t/bug-ai-studio-cloud-run-publisher-hardcodes-us-west1-for-domainmapping-violating-org-policy/187184/1 "2026-10-06T17:14:29Z")

</div>

When publishing to a GCP project which is restricted to a non-US region, the publishing fails because AI-Studio calls into the GCP project with hardcoded region “us-west1”

Please respect the region of the selected GCP project.

Here’s the trace from the GCP logging:

ERROR 2026-10-06T16:54:41.780732Z [protoPayload.serviceName: Cloud Run] [protoPayload.methodName: CreateDomainMapping] [protoPayload.resourceName: brownbag-index-1092.ai.studio] [protoPayload.authenticationInfo.principalEmail: d…@inovex.de] Constraint constraints/gcp.resourceLocations violated for attempting CreateDomainMappingActionV1 with location set to us-west1. See [Organization policy constraints &nbsp;|&nbsp; Organization Policy &nbsp;|&nbsp; Google Cloud Documentation](https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints) for more information.

{

```
"protoPayload": {

  "@type": "type.googleapis.com/google.cloud.audit.AuditLog",

  "status": {

    "code": 9,

    "message": "Constraint constraints/gcp.resourceLocations violated for attempting CreateDomainMappingActionV1 with location set to us-west1. See https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints for more information."

  },

  "authenticationInfo": {

    "principalEmail": "dominik.helleberg@inovex.de"

  },

  "requestMetadata": {

    "callerIp": "2a00:20:1001:9734:b559:230c:2d1f:84bc",

    "callerSuppliedUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36,gzip(gfe)",

    "requestAttributes": {

      "time": "2026-10-06T16:54:41.797701Z",

      "auth": {}

    },

    "destinationAttributes": {}

  },

  "serviceName": "run.googleapis.com",

  "methodName": "google.cloud.run.v1.DomainMappings.CreateDomainMapping",

  "authorizationInfo": \[

    {

      "resource": "namespaces/pg-aistudiofirebase2/domainmappings/brownbag-index-1092.ai.studio",

      "permission": "run.domainmappings.create",

      "granted": true,

      "resourceAttributes": {},

      "permissionType": "ADMIN_WRITE"

    }

  \],

  "resourceName": "namespaces/pg-aistudiofirebase2/domainmappings/brownbag-index-1092.ai.studio",

  "request": {

    "domainMapping": {

      "apiVersion": "domains.cloudrun.com/v1",

      "kind": "DomainMapping",

      "spec": {},

      "metadata": {

        "labels": {

          "managed-by": "google-ai-studio"

        },

        "name": "brownbag-index-1092.ai.studio"

      }

    },

    "@type": "type.googleapis.com/google.cloud.run.v1.CreateDomainMappingRequest",

    "region": "us-west1",

    "dryRun": "all",

    "parent": "namespaces/pg-aistudiofirebase2"

  },

  "resourceLocation": {

    "currentLocations": \[

      "us-west1"

    \]

  }

},

"insertId": "5k37bwdt32f",

"resource": {

  "type": "cloud_run_revision",

  "labels": {

    "configuration_name": "",

    "revision_name": "",

    "project_id": "pg-aistudiofirebase2",

    "location": "us-west1",

    "service_name": ""

  }

},

"timestamp": "2026-10-06T16:54:41.780732Z",

"severity": "ERROR",

"logName": "projects/pg-aistudiofirebase2/logs/cloudaudit.googleapis.com%2Factivity",

"receiveTimestamp": "2026-10-06T16:54:41.982614187Z"

```

}

---

<div class="post-metadata">

**Author:** ![Payal\_Sharma2](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/payal_sharma2/32/31911_2.png) [@Payal\_Sharma2](https://discuss.ai.google.dev/u/Payal_Sharma2)\
**Post date:** [October 9, 2026, 1:07pm UTC](https://discuss.ai.google.dev/t/bug-ai-studio-cloud-run-publisher-hardcodes-us-west1-for-domainmapping-violating-org-policy/187184/2 "2026-10-09T13:07:59Z")

</div>

Hi @Dominik_Helleberg, Thanks for the detailed trace. AI Studio currently chooses the Cloud Run region for published apps automatically, and it can’t yet be changed or matched to your organization’s location policy. As a workaround, download your app as a ZIP and deploy it to an allowed region with `gcloud run deploy --source . --region <REGION>` ([guide](https://docs.cloud.google.com/run/docs/deploying-source-code)). Set the GEMINI\_API\_KEY environment variable on the service ([details](https://ai.google.dev/gemini-api/docs/aistudio-build-mode)). Apps deployed this way won’t get an \*.ai.studio URL.

---

<div class="post-metadata">

**Author:** ![Dominik\_Helleberg](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/dominik_helleberg/32/155376_2.png) [@Dominik\_Helleberg](https://discuss.ai.google.dev/u/Dominik_Helleberg)\
**Post date:** [October 21, 2026, 6:20pm UTC](https://discuss.ai.google.dev/t/bug-ai-studio-cloud-run-publisher-hardcodes-us-west1-for-domainmapping-violating-org-policy/187184/3 "2026-10-21T18:20:50Z")

</div>

Thanks, this is a workaround but not a solution.

Would be great if we could deploy to europe for example by skipping the DomainMapping service. It works perfectly without it 😉

Thanks
