-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Potential logical ID conflict between top-level resource #6421
Copy link
Copy link
Closed
Labels
@aws-cdk/coreRelated to core CDK functionalityRelated to core CDK functionalitybugThis issue is a bug.This issue is a bug.p2
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/coreRelated to core CDK functionalityRelated to core CDK functionalitybugThis issue is a bug.This issue is a bug.p2