Provisioner release 2.1.0 (#7794 appears to be the relevant commit related to CloudFront distributions) introduces a significant workflow problem with timing for CloudFront Distribution updates.
Prior to this change, updating an origin path, for example, took seconds to complete. Now, however, the TF apply sits and waits until propagation throughout the CloudFront edge network completes. This in turn destroys automated workflows.
Prior to 2.1.0, a CloudFront Distribution update (for example, an origin path change), the portion of a TF apply related to making and registering the change in distribution configuration took, on average, 2 seconds to complete. Beginning with release 2.1.0, the same CloudFront distribution update time increases to an average of 20 plus minutes, with peak times of over an hour and 20 plus minutes.
It would be nice if a significant change like this included a boolean attribute added (comparable to the 'retain_on_destroy' boolean, but for updates) to allow users to _choose_ whether or not to wait for distribution propagation, or to move on as soon as the change is reflected, as was the behavior prior to release 2.1.0 (#7794).
There seems to be a technical reason why this was changed: https://github.com/terraform-providers/terraform-provider-aws/commit/286f294cde5eb5c94f742ab1d0f14c6166d07ec0
That said, the disruption caused by 30min+ wait times is massive. For long-waiting resources like this, a boolean switch or a virtual entity like aws_acm_certification_validation should be introduced instead.
I will have a pull request posted for this later today.
Pull request submitted: #8116
Awesome work, thanks a million @bflad.
Thanks guys! This will help a lot!
On Thu, Mar 28, 2019 at 3:04 PM Damian Nowak notifications@github.com
wrote:
Awesome work, thanks a million @bflad https://github.com/bflad.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/terraform-providers/terraform-provider-aws/issues/8073#issuecomment-477730761,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYSWsVy4r6-GkFWS0dLjCq85htcq6OTuks5vbRJEgaJpZM4cKN64
.
A new wait_for_deployment
argument (defaulting to true
, set to false
to skip waiting) for the aws_cloudfront_distribution
resource has been merged and will release with version 2.5.0 of the Terraform AWS Provider later this week. 👍
This has been released in version 2.5.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
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.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!
Most helpful comment
A new
wait_for_deployment
argument (defaulting totrue
, set tofalse
to skip waiting) for theaws_cloudfront_distribution
resource has been merged and will release with version 2.5.0 of the Terraform AWS Provider later this week. 👍