Question:
Using terraform, is there a way using aws_lb_listener to set multiple certificate arn?
Practicallyit seems “certificate_arn” field is accepting only one certificate arn. Is there a trick to add multiple certificates arn?
Something like:
1 2 3 4 5 |
resource "aws_lb_listener" "https" { certificate_arn = ["${var.certificate1_arn}", "${var.certificate2_arn}"] } |
Answer:
Seems like this is possible now with https://www.terraform.io/docs/providers/aws/r/lb_listener_certificate.html
This resource is for additional certificates and does not replace the default certificate on the listener.
1 2 3 4 5 6 7 8 9 |
resource "aws_lb_listener" "front_end" { # ... } resource "aws_lb_listener_certificate" "example" { listener_arn = "${aws_lb_listener.front_end.arn}" certificate_arn = "${aws_acm_certificate.example.arn}" } |