aws-rds: possible regression with global endpoint address
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
There seems to have been a regression with `aws-rds`. The `globalEndpoint` has been removed/changed with release [v2.180.0](https://github.com/aws/aws-cdk/releases/tag/v2.180.0).
### Regression Issue
- [x] Select this option if this issue appears to be a regression.
### Last Known Working CDK Version
v2.179.0
### Expected Behavior
When trying to use the globalEndpoint you should be able to get the address of it.
### Current Behavior
You currently get the following error on version 2.180.0 and above:
> Property 'globalEndpoint' does not exist on type 'CfnGlobalCluster'. Did you mean 'attrGlobalEndpoint'?ts(2551)
rds.generated.d.ts(4941, 14): 'attrGlobalEndpoint' is declared here.
### Reproduction Steps
run `cdk synth` on the following minimal project:
```typescript
import * as cdk from 'aws-cdk-lib';
import * as rds from 'aws-cdk-lib/aws-rds';
import * as r53 from 'aws-cdk-lib/aws-route53';
import type { Construct } from 'constructs';
export class CdkReproStack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
//global cluster
const cfnGlobalCluster = new rds.CfnGlobalCluster(this, 'cfnGlobalCluster', {
sourceDbClusterIdentifier: new rds.CfnDBCluster(this, 'cfnDBCluster', {
}).ref,
});
//example usage of globalEndpoint
if (cfnGlobalCluster.globalEndpoint/** <--error is here */ && !cdk.Token.isUnresolved(cfnGlobalCluster.globalEndpoint/** <--error also here */)) {
new r53.CnameRecord(this, 'cNameRecord', {
zone: r53.HostedZone.fromHostedZoneAttributes(this, 'hZone', {
hostedZoneId: 'id',
zoneName: 'name',
}),
recordName: 'globaldb',
domainName: (cfnGlobalCluster.globalEndpoint/** <--error also here */ as { address: string }).address,
ttl: cdk.Duration.seconds(5),
});
}
}
}
```
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### CDK CLI Version
2.180.0
### Framework Version
_No response_
### Node.js Version
v22.13.1
### OS
MacOS Sequoia 15.3.1
### Language
TypeScript
### Language Version
_No response_
### Other information
_No response_
Contributor guide
Research direction
Reproduce the issue with the minimal TypeScript project and run cdk synth against CDK v2.179.0 and v2.180.0. Compare the generated rds.generated.d.ts declarations around CfnGlobalCluster, then verify that the global endpoint can be accessed without the reported TypeScript error and the project synthesizes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, databases, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100