Skip to content

Commit b4dfbac

Browse files
committed
lifecycle trigger
1 parent 6853afd commit b4dfbac

File tree

1 file changed

+4
-13
lines changed
  • operations/deployment/terraform/modules/aws/lb

1 file changed

+4
-13
lines changed

operations/deployment/terraform/modules/aws/lb/aws_lb.tf

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,10 @@ 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-
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-
}
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
97+
lifecycle {
98+
replace_triggered_by = [local.alb_listen_protocol[count.index]]
10899
}
109100
}
110101

0 commit comments

Comments
 (0)