When I attempt to update my Terraform to 1.3.9 and Hashicorp/AWS to 4.56.0, an error similar to this is displayed: ELB (Elastic Load Balancing) Listener Certificate Error: 1RN:AWS:ELB:....
However, everything worked perfectly in my previous version, which used Terraform version 0.12 and Hashicorp/AWS version 3.72.0. Additionally, the certificate I use was genuinely recognised by AWS.
Code:
resource "aws_alb_listener" "the-app-secure" {
load_balancer_arn = aws_alb.main.arn
port = "443"
protocol = "HTTPS"
ssl_policy = "ELBSecurityPolicy-2016-08"
certificate_arn = data.terraform_remote_state.global.outputs.the_app_star_certificate_arn
default_action {
type = "forward"
target_group_arn = aws_alb_target_group.main.arn
}
}
resource "aws_lb_listener_certificate" "load_balancer" {
listener_arn = aws_alb_listener.the-app-secure.arn
certificate_arn = local.env == "production" ? data.terraform_remote_state.global.outputs.the_app_star_certificate_arn : aws_acm_certificate.cert-the-app[0].arn
depends_on = [aws_alb_listener.the-app-secure]
}
I tried to look at the Terraform official document, but I haven't yet discovered any answers. Do you know what caused this error and what I should attempt next? I appreciate it.