GoogleCloudPlatform / cloud-sql-jdbc-socket-factory

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

feat: Configure connections using DNS domain names #2047

Open hessjcg opened 2 months ago

hessjcg commented 2 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