-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
aws_cloudfront_distribution: IllegalUpdate test #33578
Conversation
Community NoteVoting for Prioritization
For Submitters
|
599fc87
to
be621af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
This functionality has been released in v5.19.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
There is a careful delicate dance between a production
aws_cloudfront_distribution
, anaws_clouldfront_continuous_deployment_policy
, and a stagingaws_cloudfront_distribution
. The AWS Console ("AWS Internal") does a lot for you in this regard. This fix brings in some of this functionality to allow continous deployments to be cleanly created and destroyed using Terraform.This PR addresses two specific issues, in addition to cleanup and logic clarification:
etag
with every change to the resource. If you're doing multiple changes as part of deleting or updating, you'll get a newetag
at each step. It's important to include the latest with each operation or you'll getPrecondition Failed
(or potentiallyInvalid MatchIf Version
) errors.aws_cloudfront_distribution
s, you need to include the continuous deployment policy ID with each API call or you'll get anIllegalUpdate
trying to update.In order to delete everything associated with a staging
aws_cloudfront_distribution
linked by anaws_cloudfront_continuous_deployment_policy
to a productionaws_cloudfront_distribution
, you need to do everything very precisely.The acyclic dependency graph looks something like this:
production distribution ➡️ continuous deployment policy ➡️ staging distribution.
The steps to delete the resources are roughly as follows (order is crucial):
Relations
Closes #33338
Closes #33575
References
Output from Acceptance Testing