Skip to content

Commit ebb03f0

Browse files
committed
fix(alb): lb target group health check attributes required by default
1 parent 42c9438 commit ebb03f0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

modules/alb/main.tf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ resource "aws_lb_target_group" "this" {
3434
for_each = length(try(each.value.health_check, {})) > 0 ? [1] : []
3535

3636
content {
37-
enabled = each.value.health_check.enabled
38-
healthy_threshold = each.value.health_check.healthy_threshold
39-
interval = each.value.health_check.interval
40-
matcher = each.value.health_check.matcher
41-
path = each.value.health_check.path
42-
port = each.value.health_check.port
43-
protocol = each.value.health_check.protocol
44-
timeout = each.value.health_check.timeout
45-
unhealthy_threshold = each.value.health_check.unhealthy_threshold
37+
enabled = try(each.value.health_check.enabled, null)
38+
healthy_threshold = try(each.value.health_check.healthy_threshold, null)
39+
interval = try(each.value.health_check.interval, null)
40+
matcher = try(each.value.health_check.matcher, null)
41+
path = try(each.value.health_check.path, null)
42+
port = try(each.value.health_check.port, null)
43+
protocol = try(each.value.health_check.protocol, null)
44+
timeout = try(each.value.health_check.timeout, null)
45+
unhealthy_threshold = try(each.value.health_check.unhealthy_threshold, null)
4646
}
4747
}
4848

0 commit comments

Comments
 (0)