Google Cloud: Constraint constraints/compute.vmExternalIpAccess violated for project — Request violates constraint 'constraints/...'
An organisation policy forbids what you asked (external IP on a VM, public bucket, allowed regions, public Cloud Run).
Constraint constraints/compute.vmExternalIpAccess violated for projectRequest violates constraint 'constraints/Operation denied by org policy: constraints/FAILED_PRECONDITION Organization Policy constraintone or more organization policy constraints violated Meaning
The error names the constraint. Inspect it with gcloud org-policies describe; the fix is to comply (e.g. use a private IP + Cloud NAT, choose an allowed region) or ask an Org Policy Administrator to grant an exception at project/folder level. Don't try to work around security constraints.
Common causes
- constraints/compute.vmExternalIpAccess blocking external IPs
- constraints/gcp.resourceLocations restricting regions
- iam.allowedPolicyMemberDomains blocking allUsers
- storage.publicAccessPrevention enforced
- run.allowedIngress / ingress settings
⚡ Quick fix
- Use a compliant configuration (private IPs, allowed region)
- Ask an org policy admin for a project-level exception
- Read the constraint:
gcloud org-policies describe CONSTRAINT --project PROJECT --effective
Detailed fix by platform
gcloud
gcloud org-policies describe constraints/compute.vmExternalIpAccess --project PROJECT --effective
How to diagnose
- Constraint — Name in message?
- Scope — Org, folder, project?
- Option — Compliant design?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- API has not been used in project before or it is disabled Google Cloud: 403 SERVICE_DISABLED — Cloud Resource Manager API has not been used in project 123456 before or it is disabled. Enable it by visiting
- Artifact Registry: Permission artifactregistry.repositories.uploadArtifacts denied Docker push: denied: Permission "artifactregistry.repositories.uploadArtifacts" denied on resource "projects/p/locations/l/repositories/r"
- BigQuery: Access Denied: Project: User does not have bigquery.jobs.create permission BigQuery: Access Denied: Project my-project: User does not have bigquery.jobs.create permission in project my-project
Most viewed in Google Cloud / Firebase
- Missing or insufficient permissions Firestore: FirebaseError: [code=permission-denied]: Missing or insufficient permissions
- Container failed to start Cloud Run: The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable
- Could not load the default credentials Google Cloud: Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 4 Nov 2026