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

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  |  Organization Policy  |  Google Cloud Documentation 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"

}

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). Set the GEMINI_API_KEY environment variable on the service (details). Apps deployed this way won’t get an *.ai.studio URL.

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 :wink:

Thanks