简体   繁体   English

使用 terraform 在 aws_lb_listener 上设置多个证书

[英]Setting multiple certificates on an aws_lb_listener using terraform

Using terraform, is there a way using aws_lb_listener to set multiple certificate arn?使用 terraform,有没有办法使用 aws_lb_listener 设置多个证书 arn?

Practicallyit seems "certificate_arn" field is accepting only one certificate arn.实际上,“certificate_arn”字段似乎只接受一个证书 arn。 Is there a trick to add multiple certificates arn?是否有添加多个证书 arn 的技巧?

Something like:类似的东西:

resource "aws_lb_listener" "https" {
  certificate_arn     = ["${var.certificate1_arn}", "${var.certificate2_arn}"]

}

Seems like this is possible now with https://www.terraform.io/docs/providers/aws/r/lb_listener_certificate.html现在似乎可以使用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}"
}

Hashicorp terraform currently not supporting attaching multiple SSL certificates. Hashicorp terraform 目前不支持附加多个 SSL 证书。

Although AWS ALB supports multiple SSL certificates.虽然 AWS ALB 支持多个 SSL 证书。

https://aws.amazon.com/about-aws/whats-new/2017/10/elastic-load-balancing-application-load-balancers-now-support-multiple-ssl-certificates-and-smart-certificate-selection-using-server-name-indication-sni/ https://aws.amazon.com/about-aws/whats-new/2017/10/elastic-load-balancing-application-load-balancers-now-support-multiple-ssl-certificates-and-smart-certificate-选择-使用-服务器-名称-指示-sni/

You can use aws cloudformation though.不过,您可以使用 aws cloudformation。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM