feat: add option to ignore CloudFront distribution etag changes#364
feat: add option to ignore CloudFront distribution etag changes#364npwolf wants to merge 1 commit intocloudposse:mainfrom
Conversation
Add new variable `cloudfront_ignore_etag_changes` to allow users to ignore changes to the CloudFront distribution etag attribute via lifecycle rules. This is useful when external processes update the CloudFront distribution, causing the etag to change and appear in Terraform plans and state. Defaults to false to maintain backward compatibility.
📝 WalkthroughWalkthroughThis pull request adds a new boolean variable to control whether Terraform ignores etag changes on CloudFront distributions, and implements a conditional lifecycle block that selectively ignores etag modifications when enabled. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@npwolf have you tested this fix on your side? Lint failed with |
goruha
left a comment
There was a problem hiding this comment.
Fix
│ Error: Invalid expression
│
│ on ../../main.tf line 480, in resource "aws_cloudfront_distribution" "default":
│ 480: ignore_changes = var.cloudfront_ignore_etag_changes ? [etag] : []
│
│ A static list expression is required.
╵
what
cloudfront_ignore_etag_changesto allow users to ignore changes to the CloudFront distribution etag attributeaws_cloudfront_distributionresource that conditionally ignores etag changes based on the variable valuewhy
falseto maintain backward compatibility with existing deploymentsreferences