Reputation: 61
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:
resource "aws_lb_listener" "https" {
certificate_arn = ["${var.certificate1_arn}", "${var.certificate2_arn}"]
}
Upvotes: 6
Views: 8274
Reputation: 4877
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.
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}"
}
Upvotes: 15
Reputation: 1484
Hashicorp terraform currently not supporting attaching multiple SSL certificates.
Although AWS ALB supports multiple SSL certificates.
You can use aws cloudformation though.
Upvotes: 1