Add private DNS endpoint attribute to `aws_dsql_cluster` resource
#47,596 opened on Apr 23, 2026
Repository metrics
- Stars
- (11,045 stars)
- PR merge metrics
- (PR metrics pending)
Description
Description
Currently, the aws_dsql_cluster resource exports vpc_endpoint_service_name, but it does not export the private DNS hostname that clients within a VPC use to connect to the cluster via AWS PrivateLink.
When connecting to an Aurora DSQL cluster over a PrivateLink interface endpoint, the hostname takes the form:
<cluster-id>.<service-identifier>.<region>.on.aws
The <service-identifier> (e.g. dsql-fnh4) is assigned by AWS and is not derivable from any currently exported attribute of aws_dsql_cluster. This forces users to either hard-code or look it up out-of-band (e.g. via the AWS CLI / Console) before they can construct the connection string in downstream Terraform resources such as aws_route53_record, SSM parameters, Kubernetes Secrets, or database connection configurations.
Exposing the fully-qualified private DNS endpoint (or at minimum the service identifier) as an exported attribute would let users wire DSQL clusters into the rest of their infrastructure purely in Terraform.
Affected Resource(s) or Data Source(s)
aws_dsql_cluster
Potential Terraform Configuration
resource "aws_dsql_cluster" "example" {
deletion_protection_enabled = true
}
# Desired: an exported attribute that yields the private DNS hostname
# e.g. "my-cluster-id.dsql-fnh4.us-east-1.on.aws"
output "dsql_endpoint" {
value = aws_dsql_cluster.example.endpoint
}
Possible attribute names:
endpoint— fully-qualified hostname<identifier>.<service-identifier>.<region>.on.awsvpc_endpoint_service_id/service_identifier— just thedsql-fnh4-style token, if preferred for composability
References
- Managing and connecting to Amazon Aurora DSQL clusters using AWS PrivateLink
- aws_dsql_cluster resource docs
Would you like to implement the enhancement?
No