Skip to content

Use configured DNS name to lookup instance IP address #1362

@hessjcg

Description

@hessjcg

Bug Description

When a custom DNS name is used to connect to a Cloud SQL instance, the dialer should first attempt to resolve the custom DNS name to an IP address and use that for the connection. If the lookup fails, the dialer should fall back to using the IP address from the instance metadata.

This change modifies the dialer to:

  • Use the configured resolver to look up the host's IP address.
  • Use the IP address from the A record of the custom DNS name if available.
  • Fall back to the IP address from the instance metadata if the A record is not available.

See also GoogleCloudPlatform/cloud-sql-go-connector#1053

Metadata

Metadata

Assignees

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions