The Internet is quickly running out of IPv4 addresses (the traditional IP addresses, e.g. 173.194.251.158), which has led to rationing strategies such as having to pay for reserved addresses. The industry response to this issue has been to develop a new, much larger, address space: IPv6 offers an abundance of available IPs (of the form 2001:4860:4864:1:329a:211f:1d19:a258). Google has been at the forefront of IPv6 adoption, and we are now assigning an immutable IPv6 address to each and every Cloud SQL instance and making these addresses available for free.

Everything is ready for you to benefit from IPv6: you can see the IPv6 address of your instance using the Cloud SDK command-line tool. With the current version of the tool, the command is:

gcloud sql instances describe

The response will be of this form (we’ve bolded the IPv6 address and shortened the output for readability).

currentDiskSize: 82.4 MB
databaseVersion: MYSQL_5_5
instance: testinstance1
instanceType: CLOUDSQL_INSTANCE
ipAddresses:
[
ipAddress: 173.194.251.158
]
ipv6Address: 2001:4860:4864:1:329a:211f:1d19:a258
maxDiskSize: 250.0 GB
(...)


Alternatively, you can see it in the Google Developers Console (in the Properties section on the instance overview page):

All new and existing Cloud SQL, instances will be assigned an immutable IPv6 address. Please note however that in order to use it you need to explicitly authorize your Cloud SQL instances to receive IPv6 traffic. You can do this using the same access control mechanism you use to control IPv4 traffic, by explicitly authorizing external IPv6 addresses that are allowed to connect to your instance. For details, see how you can configuring access control for IP connections.

If you currently connect to your instance over IPv4, you can continue to do so, or you can switch to connect over IPv6. If you make the change, you can then choose to release your IPv4 address and stop paying for it. To do so, follow the instructions to edit the properties of a Cloud SQL instance.

We understand how frustrating it is to optimize for artificial constraints, like a limited address space, which is why we’re bringing IPv6 to Google Cloud SQL so you can focus on your applications instead. For any question please join us on Stack Overflow using the google-cloud-sql tag.

-- Posted by Easwar Swaminathan, Software Engineer