Closed jacky96623 closed 1 year ago
@jacky96623 thanks for reporting this issue! For future reference, please open CloudFormation template language-specific issues in this repo: https://github.com/aws-cloudformation/cfn-language-discussion
We'll go ahead and transfer this issue to that repo for you.
Thanks @jacky96623 for raising this issue. We will triage it with the team and notify about updates here.
Just confirming that I'm able to reproduce the problem. Really appreciate you providing the template example.
Another issue with the same root cause:
Hey @jacky96623. We have made a code change to fix this issue. It will start to make its way to production regions today and rollout to all regions will take about a week.
The bugfix has rolled out to all regions and this issue is now resolved
Name of the resource
AWS::IAM::Role
Resource Name
No response
Issue Description
I have been using parameters and conditions to (relatively) dynamically create resources depends on a list. For example, I may have a parameter named
subnets
which accepts a list of subnet ID and a parameter namedsubnetCount
which accepts an integer between 1 and 4. Then I leveraged these 2 parameters to create 4 conditions to control the creation of corresponding resources.Recently, I noticed that the AWS CloudFormation new language extensions transform which enables conditional DeletionPolicy and started to use this transform. However, the template becomes not deployable.
Expected Behavior
The template should be deployable.
Observed Behavior
By looking at CloudFormation ChangeSet, it is reported that
Test Cases
Minimal template to reproduce:
Example (redacted) parameters:
Other Details
As a supplement, the template is deployable if you comment the top-level Transform attribute and also the conditioned DeletionPolicy.