-
Notifications
You must be signed in to change notification settings - Fork 75
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
Lifecycle rule with noncurrent_version_expiration_days causes a update every plan/apply in 2.0.0 #543
Comments
Thanks for reporting this issue! It looks like this is because #526 isn't returning null for |
Just created #545 if you have a second to test @sdejong629. I was able to reproduce in the unit tests and this change resolved the issue |
If you have a lead on how I can use your repo instead of the registered one... And isn't it dangerous to set an expiration date if none is set? Should it just be empty? It isn't supposed to expire items at all. |
Thanks for the detailed report @sdejong629!
To test it directly from @pjsier's branch, you can clone his repo and checkout his branch
🤔 As I see @pjsier's change is not for setting a date if it's empty. Instead, it's to format the Date field of Expiration in the format "YYYY-MM-DD" only if Expiration is not null. Because if we apply fortmat in a null value, it sets the expiration date to |
Prerequisites
Description
When using a ilm resource and using the noncurrent_version_expiration_days rule, a plan and apply always updates the resource, even when no changes have been made to terraform code.
terraform config
Terraform plan output:
Steps to Reproduce
Expected behavior:
No changes should occur after the initial
Actual behavior:
Expiration date is updated to null
Reproduces how often: [What percentage of the time does it reproduce?]
100%
Versions
2.0.0
Additional Information
I have not tested any other ILM policy rules, just the noncurrent_version_expiration_days. I'm creating buckets trough a custom module, which just creates serveral of these sets.
The text was updated successfully, but these errors were encountered: