Skip to content
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

wait_for_certificate_issued input not waiting until the certificate is issued #58

Closed
tbpoetke opened this issue Aug 6, 2022 · 1 comment · Fixed by #59
Closed

wait_for_certificate_issued input not waiting until the certificate is issued #58

tbpoetke opened this issue Aug 6, 2022 · 1 comment · Fixed by #59
Labels
bug 🐛 An issue with the system

Comments

@tbpoetke
Copy link
Contributor

tbpoetke commented Aug 6, 2022

Describe the Bug

First time applying my Terraform stack ends in:

Error: creating ELBv2 Listener (arn:aws:elasticloadbalancing:eu-central-1:128840427886:loadbalancer/app/XXX/9202ae7b846a2e1c): UnsupportedCertificate: The certificate 'arn:aws:acm:eu-central-1:128840427886:certificate/e7050367-4b27-4582-8157-3fa96710fccd' must have a fully-qualified domain name, a supported signature, and a supported key size.

after waiting some minutes the next apply show the change of the validation:

module.acm.module.acm_request_certificate.aws_acm_certificate.default[0] has changed
  ~ resource "aws_acm_certificate" "default" {
        id                        = "arn:aws:acm:eu-central-1:128840427886:certificate/e7050367-4b27-4582-8157-3fa96710fccd"
      ~ status                    = "PENDING_VALIDATION" -> "ISSUED"
      + tags                      = {}
        # (7 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

The next apply was sucessfully completed .

I have set wait_for_certificate_issued = true
it should not prevent this ?

@tbpoetke tbpoetke added the bug 🐛 An issue with the system label Aug 6, 2022
@nitrocode nitrocode changed the title wait_for_certificate_issued not working wait_for_certificate_issued input not waiting until the certificate is issued Sep 13, 2022
@nitrocode
Copy link
Member

@tbpoetke The input uses this resource aws_acm_certificate_validation and we are limited by the inputs of this resource.

resource "aws_acm_certificate_validation" "default" {
count = local.process_domain_validation_options && var.wait_for_certificate_issued ? 1 : 0
certificate_arn = join("", aws_acm_certificate.default.*.arn)
validation_record_fqdns = [for record in aws_route53_record.default : record.fqdn]
}

We have considered using an outside sleep but it would be better to improve the above resource in the aws provider than to put in a custom sleep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants