-
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
Increasing ACM destruction timeout #5307
Comments
How are you referring to the ACM certificate in your Cloudfront distribution? If you had something like: resource "aws_acm_certificate" "ssl_certificate" {
...
}
# ACM validation stuff here...
resource "aws_cloudfront_distribution" "distribution" {
...
viewer_certificate {
acm_certificate_arn = "${aws_acm_certificate.ssl_certificate.arn}"
ssl_support_method = "sni-only"
minimum_protocol_version = "TLSv1.2_2018"
}
} Then I'd expect Terraform to realise it needs to complete the destruction of the Cloudfront distribution before starting the destruction of the ACM certificate. |
I'm doing exactly that AFAICT: resource "aws_cloudfront_distribution" "this" {
aliases = ["${var.cloudfront_dns_domain}"]
// (other cloudfront config goes here)
viewer_certificate {
acm_certificate_arn = "${aws_acm_certificate_validation.this.certificate_arn}"
ssl_support_method = "sni-only"
minimum_protocol_version = "TLSv1.1_2016"
}
}
resource "aws_acm_certificate" "this" {
provider = "aws.acm_provider" # because ACM needs to be used in the "us-east-1" region
domain_name = "${var.cloudfront_dns_domain}"
validation_method = "DNS"
}
// (cert validation goes here)
resource "aws_acm_certificate_validation" "this" {
provider = "aws.acm_provider" # because ACM needs to be used in the "us-east-1" region
certificate_arn = "${aws_acm_certificate.this.arn}"
validation_record_fqdns = ["${aws_route53_record.cert_validation.fqdn}"]
} Unless I'm overlooking something..? |
Can you please provide the |
Finally had time to try this again, but couldn't actually reproduce it this time:
I'll just chalk this up as me doing something silly the first time around, and close the issue. Sorry for wasting your time! Tangentially, the CF destroy actually failed in the end with the same error as in #1074, but 99,9% sure it has nothing to do with this specific issue. |
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! |
Community Note
Terraform Version
Affected Resource(s)
Expected Behavior
Destroying an
aws_cloudfront_distribution
and aaws_acm_certificate
that's being used with that distribution results in the destruction of both.Actual Behavior
Destroying
aws_cloudfront_distribution
takes longer than the timeout of the destruction ofaws_acm_certificate
. Thus, theapply
fails, with only theaws_cloudfront_distribution
destroyed. Running it again will immediately succeed in destroying theaws_acm_certificate
, since it's no longer used.References
The text was updated successfully, but these errors were encountered: