Other Articles

Cloud SQL – Configure Private IP

This check ensures that Cloud SQL instances use private IP connectivity. Private IP restricts database access to internal networks, reducing exposure to the public internet and enhancing overall network security.

Check Details

  • Resource: Cloud SQL
  • Check: Configure private IP
  • Risk: Without private IP connectivity, Cloud SQL instances may rely on public networking, increasing the risk of unauthorized access, data interception, and exposure to external threats.

Remediation via Google Cloud Console

  1. Log in to the Google Cloud Console and navigate to Cloud SQL. Cloud Sql Instance
  2. Click on the affected Cloud SQL instance.
  3. Click Edit to modify the instance configuration. Cloud Sql Instance Edit
  4. Scroll to the Connections section.
  5. Enable Private IP and select the appropriate VPC network. Cloud SQL Instance Private IP
  6. Click Save to apply the changes.

Remediation via Google Cloud CLI

  1. Open the Google Cloud Console and launch Cloud Shell. GCP Cloud Shell
  2. Update the Cloud SQL instance to enable private IP connectivity:
    
    
    gcloud sql instances patch <INSTANCE_NAME> \
    --network <VPC_NETWORK> \
    --no-assign-ip
    

Replace <INSTANCE_NAME> with your Cloud SQL instance name. The <VPC_NETWORK> should be the full VPC network resource path. Enabling private IP requires a configured private services access connection.

Default Value

By default, Cloud SQL instances do not use private IP connectivity unless explicitly configured. Public IP may be assigned, making the instance accessible over the internet.