-
Notifications
You must be signed in to change notification settings - Fork 4.1k
(aws-rds): when @aws-cdk/aws-rds:lowercaseDbIdentifier is true (which is the default in v2), tokens in the clusterIdentifier property get mutated and thus are not replaced during synthesis #18802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for opening the issue @saltman424!
I think this is the best solution - we can't really lowercase deploy-time values anyway. Would you consider opening us a PR fixing this? Here's our "Contributing" guide: https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md. Thanks, |
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*
|
Fixes aws#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*
What is the problem?
The issue has to do with these lines (possibly more, but these are the only two that I saw):
aws-cdk/packages/@aws-cdk/aws-rds/lib/cluster.ts
Line 361 in 323281e
aws-cdk/packages/@aws-cdk/aws-rds/lib/instance.ts
Line 716 in 323281e
The .toLowerCase messes up the tokens.
Reproduction Steps
What did you expect to happen?
Cluster identifier =
my-prod-db-cluster
What actually happened?
Cluster identifier =
my-${token[token.1234]}-db-cluster
CDK CLI Version
2.8.0
Framework Version
2.8.0
Node.js Version
16.13.1
OS
Microsoft Windows 10 Enterprise
Language
Typescript
Language Version
4.5.5
Other information
I am not sure how this should be handled, but some options are:
&& !cdk.Token.isUnresolved(clusterIdentifier)
to the condition that checks if the feature flag is enabledThe text was updated successfully, but these errors were encountered: