feat: Add PSC DNS and Global Write Endpoint support to NodeJS Connector#593
Open
hessjcg wants to merge 1 commit into
Open
feat: Add PSC DNS and Global Write Endpoint support to NodeJS Connector#593hessjcg wants to merge 1 commit into
hessjcg wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
This change implements Private Service Connect (PSC) DNS Name Resolution & Fallback feature for the NodeJS connector, allowing it to securely connect to Cloud SQL database instances using PSC DNS hostnames, custom domain names (CNAMEs), and Global Write Endpoints. - Updated dns-lookup.ts to support CNAME resolution and return sorted TXT records. - Updated sqladmin-fetcher.ts to implement resolveConnectSettings calling the SQL Admin API endpoint. - Updated parse-instance-connection-name.ts with the resolution algorithm: - Match well-known DNS pattern and resolve via SQL Admin API. - Fallback to TXT records. - Fallback to CNAME records (up to depth 10 to prevent loops). - Updated tests and mocks to verify the new resolution logic.
kgala2
reviewed
Jul 24, 2026
kgala2
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Private Service Connect (PSC) DNS Name Resolution & Fallback feature enables the Go connector to securely connect to Cloud SQL database instances using Private Service Connect (PSC) DNS, custom domain names (CNAMEs), and Global Write Endpoints.
The connector can now dial PSC instances using:
Its regional DNS hostname (e.g., 0123456789ab.fedcba9876543.us-central1.sql-psc.goog)
A custom domain CNAME pointing to the instance PSC DNS hostname
A Global Write Endpoint DNS hostname (e.g., 0123456789ab.fedcba9876543.global.sql-psc.goog)
The connectors will dynamically resolve this hostname to its real Cloud SQL instance connection name via the SQL Admin API.
For Global Write Endpoints (which use the "global" region in their DNS name), the resolver bypasses direct API resolution (as "global" is not a valid API region) and forces fallback to CNAME resolution. This CNAME should point to the active regional instance DNS hostname, enabling automatic failover.
See: GoogleCloudPlatform/cloud-sql-go-connector#1106