Skip to content
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

Potential logical ID conflict between top-level resource #6421

Closed
eladb opened this issue Feb 24, 2020 · 1 comment
Closed

Potential logical ID conflict between top-level resource #6421

eladb opened this issue Feb 24, 2020 · 1 comment
Assignees
Labels
@aws-cdk/core Related to core CDK functionality bug This issue is a bug. p2

Comments

@eladb
Copy link
Contributor

eladb commented Feb 24, 2020

If two top-level resources (resources defined directly under a stack) have logical IDs that only differ by non alpha-numeric characters, they will get the same logical ID and will conflict.

Sadly, we can't fix this bug without a breaking change in 1.x, so we should consider fixing this in v2.0.

Reproduction Steps

const stack = new Stack();
const r1 = new Resource(stack, 'a-b');
const r2 = new Resource(stack, 'ab');

In this case, both r1 and r2 will get the logical ID ab because we filter non-alphanumeric characters from the logical ID for top-level resources.

Other

The code is here:

return removeNonAlphanumeric(components[0]);


This is 🐛 Bug Report

@eladb eladb added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. p2 labels Feb 24, 2020
@SomayaB SomayaB added the @aws-cdk/core Related to core CDK functionality label Feb 24, 2020
@SomayaB SomayaB removed the needs-triage This issue or PR still needs to be triaged. label Feb 24, 2020
@eladb
Copy link
Contributor Author

eladb commented Aug 4, 2020

We will not be able to make any changes to how logical IDs are rendered. We will have to leave with this forever and ever... Sorry.

@eladb eladb closed this as completed Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/core Related to core CDK functionality bug This issue is a bug. p2
Projects
None yet
Development

No branches or pull requests

2 participants