How to Configure a Public IP in Cloud SQL in GCP
This page describes how to configure public IP connectivity for a Cloud SQL instance.
You can configure your Cloud SQL instance to have a public IPv4 address, and to accept connections from specific IP addresses or a range of addresses by adding authorized addresses to your instance.
You can't specify a private network (for example, 10.x.x.x) as an authorized network.
Public IP addresses for PostgreSQL instances:
- IPv6: Instances do not support IPv6.
- IPv4: Instances have a static IPv4 address automatically assigned. There is a small charge for the IP address any time your instance is off (deactivated).
In the Google Cloud console, go to the Cloud SQL Instances page.
- To open the Overview page of an instance, click the instance name.
- From the SQL navigation menu, select Connections.
- Click the Networking tab.
- Select the Public IP checkbox.
- Click Done.
- Click Save.
In CLI:
If you haven't already, add an IPv4 address to the instance:
- Show all existing authorized addresses by describing the instance:
No comments