Back to controls

Ensure Instance IP assignment is set to private

Instance addresses can be public IP or private IP. Public IP means that the instance is accessible through the public internet. In contrast, instances using only private IP are not accessible through the public internet, but are accessible through a Virtual Private Cloud (VPC).

Category

Controls

Medium

Applies to

Google Cloud

Coverage

1 queries

Asset types

1 covered

Overview

Instance addresses can be public IP or private IP. Public IP means that the instance is accessible through the public internet. In contrast, instances using only private IP are not accessible through the public internet, but are accessible through a Virtual Private Cloud (VPC).

Limiting network access to your database will limit potential attacks.

Rationale

Setting databases access only to private will reduce attack surface.

Impact

If you set a database IP to private, only a host from the same network will have the ability to connect your database.

Configuring an existing Cloud SQL instance to use private IP causes the instance to restart.

Remediation guidance

From Google Cloud Console

  1. Open Cloud SQL Instances in Google Cloud Console.
  2. Select the affected instance.
  3. Go to Connections -> Networking.
  4. Enable Private IP.
  5. Select the target VPC network.
  6. If prompted, create or select the required Private Services Access connection and allocated range.
  7. Optional: enable Private path if approved Google-managed services such as BigQuery must reach the instance over private connectivity.
  8. Save the change.

Using Google Cloud CLI

First confirm that Private Services Access is already configured for the VPC. Then patch the instance to use private IP and disable the public address:

gcloud sql instances patch <instance-id>   --project=<project-id>   --network=projects/<network-project-id>/global/networks/<vpc-network-name>   --no-assign-ip   --enable-google-private-path   --enforce-new-sql-network-architecture

Validate the networking configuration:

gcloud sql instances describe <instance-id>   --project=<project-id>   --format='yaml(settings.ipConfiguration,sqlNetworkArchitecture)'

Better platform fix

For sensitive environments, standardize on private IP for Cloud SQL by default and treat public IP as an exception. Pair this with connector or proxy-based access patterns and organization policy guardrails where possible.

Operational notes

  • Changing an existing instance to private IP causes a restart.
  • Shared VPC environments require the correct host-project network reference and Service Networking permissions.
  • If the instance still needs public connectivity for a transition period, remove it later in a planned second step instead of leaving it indefinitely.

References

  1. https://cloud.google.com/sql/docs/postgres/configure-private-ip
  2. https://docs.cloud.google.com/sdk/gcloud/reference/sql/instances/patch
  3. https://cloud.google.com/vpc/docs/configure-private-services-access

Service-wide remediation

Recommended when many resources are affected: move Cloud SQL onto a private-connectivity baseline instead of patching instances one by one.

Standardize private IP, Private Services Access, and approved client connectivity patterns in your landing-zone and database provisioning modules.

Operational rollout

  1. Verify network prerequisites and IP range capacity first.
  2. Migrate non-production instances before production.
  3. Re-scan after instance restarts complete and remove any leftover public-access exceptions.

Query logic

These are the stored checks tied to this control.

Ensure Instance IP assignment is set to private

Connectors

Google Cloud

Covered asset types

CloudSQLInstance

Expected check: eq []

{
  cloudSqlInstances(
    where: {
      cloudProvider: "gcp"
      ipAddresses_SOME: { NOT: { type: "PRIVATE" } }
    }
  ) {
    ...AssetFragment
  }
}
Cyscale Logo
Cyscale is an agentless cloud-native application protection platform (CNAPP) that automates the contextual analysis of cloud misconfigurations, vulnerabilities, access, and data, to provide an accurate and actionable assessment of risk.

Stay connected

Receive new blog posts and product updates from Cyscale

By clicking Subscribe, I agree to Cyscale’s Privacy Policy


© 2026 Cyscale Limited

LinkedIn icon
Twitter icon
Facebook icon
crunch base icon
angel icon