# Restrict public IP access on Cloud SQL instances

Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.

Restrict public IP access on Cloud SQL instances is a Google Cloud guardrail written in organization Policy Service. Stops Public IP from being configured on Cloud SQL instances where the constraint is enforced. What it breaks: google documents that the constraint is not retroactive: instances with existing Public IP access keep working.

```text
constraints/sql.restrictPublicIp
This boolean constraint restricts configuring Public IP on Cloud SQL instances where this constraint is enforced. This constraint is not retroactive, Cloud SQL instances with existing Public IP access will still work even after this constraint is enforced.
By default, Public IP access is allowed to Cloud SQL instances.
```

- **Blocks:** Stops Public IP from being configured on Cloud SQL instances where the constraint is enforced. (legacy managed constraint, boolean.)
- **Breaks:** Google documents that the constraint is not retroactive: instances with existing Public IP access keep working. ([source](https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints))
- **Test before applying:** As for every Organization Policy Service guardrail: [how to test before enforcing](/mechanisms/org-policy/)
- **Mechanism:** [Organization Policy Service (managed and legacy constraints)](/mechanisms/org-policy/): Resources in the organization, folder or project where the policy is set and its descendants; Google says application of new policies is usually not retroactive.
- **Taken from:** [provider documentation](https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints), provider documentation

## What the source says

"This boolean constraint restricts configuring Public IP on Cloud SQL instances where this constraint is enforced." (read 10 Nov 2026).

On what it breaks: "This constraint is not retroactive, Cloud SQL instances with existing Public IP access will still work even after this constraint is enforced."

## Related guardrails

- [Deny disabling block public access for AMIs](/guardrails/aws-scp-deny-disable-ami-block-public-access/): AWS, Service control policies (SCPs), public exposure
- [Require IAM authentication on Lambda function URLs](/guardrails/aws-scp-require-lambda-url-iam-auth/): AWS, Service control policies (SCPs), public exposure
- [Deny changes to S3 Block Public Access at bucket level](/guardrails/aws-rcp-deny-bucket-public-access-block-changes/): AWS, Resource control policies (RCPs), public exposure
- [Enforce public access prevention on Cloud Storage](/guardrails/gcp-orgpolicy-storage-public-access-prevention/): Google Cloud, Organization Policy Service (managed and legacy constraints), public exposure
- [Define allowed external IPs for VM instances](/guardrails/gcp-orgpolicy-vm-external-ip-access/): Google Cloud, Organization Policy Service (managed and legacy constraints), public exposure

## Related pages

- [Define allowed external IPs for VM instances (Google Cloud Organization Policy Service)](/guardrails/gcp-orgpolicy-vm-external-ip-access/)
- [Skip default network creation (Google Cloud Organization Policy Service)](/guardrails/gcp-orgpolicy-skip-default-network/)
- [Restrict VPC peering usage (Google Cloud Organization Policy Service)](/guardrails/gcp-orgpolicy-restrict-vpc-peering/)

## Sources

- Restrict public IP access on Cloud SQL instances: https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints (read 10 Nov 2026)
- How to test it first: https://cloud.google.com/resource-manager/docs/organization-policy/dry-run-policy (read 10 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://cloudgovernancetools.com/guardrails/gcp-orgpolicy-sql-restrict-public-ip/
