Skip to content

Top-level L2 resources should have unmangled logical IDs #1687

@eladb

Description

@eladb

Customers expect that when they add L2 resources directly to the Stack, the id they provide for the L2 will be the logical ID of the underlying L1 resource. This will also clean up the logical IDs of deCDK resource (#1618).

Aside from this being a huge breaking change, and we should probably allow people to disable this behavior for backwards compat. I don't see why we shouldn't implement this heuristic.

Change logical ID to "Default" (or ".") and then defaultChild (#2290) should be the way to access these resources.

@rix0rrr @RomainMuller @sam-goodwin what do you guys think?

Metadata

Metadata

Assignees

Labels

@aws-cdk/coreRelated to core CDK functionalityeffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.package/cfnRelated to the CFN layer (L1)pr/breaking-changeThis PR is a breaking change. It needs to be modified to be allowed in the current major version.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions