Numeric field in aws.ecr.LifecyclePolicy policy json prevents changes from being detected #2204
Labels
bug/diff
kind/bug related to Pulumi generating wrong diffs on preview or up.
kind/bug
Some behavior is incorrect or out of spec
resolution/fixed
This issue was fixed
What happened?
We were able to create an
aws.ecr.LifecyclePolicy
that caused docker images to be retired when there are more than 10 in the ECR, however when we tried to reduce the number of images to store to 5, this was not reflected in AWS or the pulumi console when apulumi up
was triggered.The presence of a numeric field in the
selection
field of a policy rule (e.g.rule.selection.countNumber
), seems to prevent any changes in thatselection
object from being detected (e.g. changes to therule.selection.tagPrefixList
field). When we made it a stringrule.selection.countNumber: '5'
, the change was detected bypulumi up
diffing tool, however type validation failed when we tried to continue with thepulumi up
workflow and actually persist the changes to AWS.Steps to reproduce
First policy example is created successfully by a
pulumi up
command:Modified policy is not reflected by the next call to
pulumi up
:Expected Behavior
The second
pulumi up
call recognises a change to the policy, and persists the changes to pulumi and AWS.Actual Behavior
No change is registered by the second
pulumi up
call, resulting in a silent failure in our CI jobs, making at appear that the change had been made without it actually happening in AWS.Output of
pulumi about
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: