Skip to content

Commit 5429e55

Browse files
authored
fix(rds): tokens should not be lowercased (#20287)
Fixes #18802 Pretty much does the suggested fix in the issue. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 9a3ad0b commit 5429e55

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: packages/@aws-cdk/aws-rds/lib/cluster.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ abstract class DatabaseClusterNew extends DatabaseClusterBase {
438438
const clusterParameterGroupConfig = clusterParameterGroup?.bindToCluster({});
439439
this.engine = props.engine;
440440

441-
const clusterIdentifier = FeatureFlags.of(this).isEnabled(cxapi.RDS_LOWERCASE_DB_IDENTIFIER)
441+
const clusterIdentifier = FeatureFlags.of(this).isEnabled(cxapi.RDS_LOWERCASE_DB_IDENTIFIER) && !Token.isUnresolved(props.clusterIdentifier)
442442
? props.clusterIdentifier?.toLowerCase()
443443
: props.clusterIdentifier;
444444

Diff for: packages/@aws-cdk/aws-rds/lib/instance.ts

+1
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ abstract class DatabaseInstanceNew extends DatabaseInstanceBase implements IData
715715
}
716716

717717
const maybeLowercasedInstanceId = FeatureFlags.of(this).isEnabled(cxapi.RDS_LOWERCASE_DB_IDENTIFIER)
718+
&& !Token.isUnresolved(props.instanceIdentifier)
718719
? props.instanceIdentifier?.toLowerCase()
719720
: props.instanceIdentifier;
720721

0 commit comments

Comments
 (0)