File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
operations/deployment/terraform/modules/aws/lb Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,20 @@ resource "aws_lb_listener" "vm_alb_listener" {
9292 target_group_arn = aws_lb_target_group. vm_alb_tg [count . index ]. arn
9393 }
9494 # https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html
95- ssl_policy = local. alb_listen_protocol [count . index ] == " HTTPS" ? var. aws_alb_ssl_policy : null
96- certificate_arn = local. alb_listen_protocol [count . index ] == " HTTPS" ? var. aws_certificates_selected_arn : null
95+
96+ dynamic "ssl_policy" {
97+ for_each = local. alb_listen_protocol [count . index ] == " HTTPS" ? [1 ] : []
98+ content {
99+ ssl_policy = var. aws_alb_ssl_policy
100+ }
101+ }
102+
103+ dynamic "certificate_arn" {
104+ for_each = local. alb_listen_protocol [count . index ] == " HTTPS" ? [1 ] : []
105+ content {
106+ certificate_arn = var. aws_certificates_selected_arn
107+ }
108+ }
97109}
98110
99111# Attach EC2 instance(s) to target group(s)
You can’t perform that action at this time.
0 commit comments