-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Cloudfront Function Update - Not triggering redeployment #20788
Comments
Relates: #19529. |
Hi @turingbeing 👋 Thank you for taking the time to file this issue. It looks like this was related to #19529, as mentioned above, which looks to have been resolved by #19697 (released with |
So you're expecting the distribution to be updated by terraform at the same time as modifying & publishing the CF function? That is the behavior of Lambda edge functions but not CF functions. CF functions aren't versioned like lambdas. When updated CF function ARN is not also updated. When you have I mentioned a race condition that can occur because of this: #19529 (comment) |
I am expecting Terraform to behave in the same manner as the AWS CLI Console, in that when you update the function, the Cloudfront Distribution updates. I've not delved into the weeds, merely observed a functional difference between the two, they should have functional equivalence |
How long did you wait before attempting to run plan again? Your plan is showing that the cloudfront function deployment was still |
I'm not sure tbh, but when I checked the distribution after running the apply, it certainly wasn't updating, and that would've been several minutes after running apply! I noticed it when inspecting the headers, and they weren't current. I now use the new Policies feature rather than a function, but might revisit if I get time. Thanks for the input |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
N/A
Panic Output
N/A
Expected Behavior
When the
aws_cloudfront_function
Code ETAG changes, this should trigger a Redeployment of the Cloudfront Distribution.Actual Behavior
The function changes are applied, but the distribution does not redeploy. A subsequent plan (after doing a manual redeploy) shows the changes outside of terraform
Steps to Reproduce
terraform apply
terraform apply
Cloudfront is not redeployed
Important Factoids
N/A
References
N/A
The text was updated successfully, but these errors were encountered: