GoogleCloudPlatform / cloud-sql-jdbc-socket-factory

A collection of Java libraries for connecting securely to Cloud SQL
Apache License 2.0
234 stars 119 forks source link

feat: Configure connections using DNS domain names #2047

Open hessjcg opened 4 months ago

hessjcg commented 4 months ago

The dialer may be configured to use a DNS name to look up the instance name instead of configuring the connector with the instance name directly.

Add a DNS TXT record for the Cloud SQL instance to a private DNS server or a private Google Cloud DNS Zone used by your application. For example:

Open a database connection using the DNS name:

//TODO

See also: the Cloud SQL Go Connector implementation

Part of #2043