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

[cfn-include] Allow re-naming the template's logical IDs #9714

Closed
skinny85 opened this issue Aug 14, 2020 · 0 comments · Fixed by #10169
Closed

[cfn-include] Allow re-naming the template's logical IDs #9714

skinny85 opened this issue Aug 14, 2020 · 0 comments · Fixed by #10169
Assignees
Labels
@aws-cdk/cloudformation-include Issues related to the "CFN include v.20" package effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@skinny85
Copy link
Contributor

skinny85 commented Aug 14, 2020

Right now, whenever we use CfnInclude, we always override the logical IDs of all elements (Resources, Parameters, etc.) we find there to be the same as in the template, regardless of the CDK construct hierarchy they are created in.

There should be an option added to CfnIncludeProps (possible name: preserveLogicalIds) that allows to turn that behavior off, so that the CDK generates the logical IDs itself, like it does for newly created resources (the default should be true, to preserve the current behavior).

There's also a test in the current suite which should be enabled after this is done.

This issue has dependencies on the following issues (these need to be completed before this can be done):

@github-actions github-actions bot added the @aws-cdk/cloudformation-include Issues related to the "CFN include v.20" package label Aug 14, 2020
@skinny85 skinny85 added effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 labels Aug 14, 2020
skinny85 added a commit to skinny85/aws-cdk that referenced this issue Sep 3, 2020
To facilitate using CfnInclude for vending CloudFormation templates as CDK Constructs,
add a new preserveLogicalIds parameter to CfnInclude that re-names
all logical IDs of all elements (including references to them)
with the standard CDK logical ID generation algorithm.

Closes aws#9714
@mergify mergify bot closed this as completed in #10169 Sep 4, 2020
mergify bot pushed a commit that referenced this issue Sep 4, 2020
…10169)

To facilitate using CfnInclude for vending CloudFormation templates as CDK Constructs,
add a new `preserveLogicalIds` parameter to `CfnInclude` that re-names
all logical IDs of all elements (including references to them)
with the standard CDK logical ID generation algorithm.

Closes #9714

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/cloudformation-include Issues related to the "CFN include v.20" package effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant