Skip to content

Use configured DNS name to lookup instance IP address #1362

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

Activity

  1. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Dec 17, 2025
  2. added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    and removed
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Dec 17, 2025
  3. added 3 commits that reference this issue on Dec 17, 2025
    e3db350
    f0e5f23
    dcce02e
  4. added a commit that references this issue on Dec 17, 2025
    18eddc4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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