@@ -25,24 +25,24 @@ resource "aws_lb_target_group" "main_no_logs" {
2525 vpc_id = " ${ var . vpc_id } "
2626 port = " ${ lookup (var. target_groups [count . index ], " backend_port" )} "
2727 protocol = " ${ upper (lookup (var. target_groups [count . index ], " backend_protocol" ))} "
28- deregistration_delay = " ${ lookup (var. target_groups [count . index ], " deregistration_delay" , lookup (var . target_groups_defaults , " deregistration_delay" ))} "
29- target_type = " ${ lookup (var. target_groups [count . index ], " target_type" , lookup (var . target_groups_defaults , " target_type" ))} "
28+ deregistration_delay = " ${ lookup (var. target_groups [count . index ], " deregistration_delay" , lookup (local . target_groups_defaults , " deregistration_delay" ))} "
29+ target_type = " ${ lookup (var. target_groups [count . index ], " target_type" , lookup (local . target_groups_defaults , " target_type" ))} "
3030
3131 health_check {
32- interval = " ${ lookup (var. target_groups [count . index ], " health_check_interval" , lookup (var . target_groups_defaults , " health_check_interval" ))} "
33- path = " ${ lookup (var. target_groups [count . index ], " health_check_path" , lookup (var . target_groups_defaults , " health_check_path" ))} "
34- port = " ${ lookup (var. target_groups [count . index ], " health_check_port" , lookup (var . target_groups_defaults , " health_check_port" ))} "
35- healthy_threshold = " ${ lookup (var. target_groups [count . index ], " health_check_healthy_threshold" , lookup (var . target_groups_defaults , " health_check_healthy_threshold" ))} "
36- unhealthy_threshold = " ${ lookup (var. target_groups [count . index ], " health_check_unhealthy_threshold" , lookup (var . target_groups_defaults , " health_check_unhealthy_threshold" ))} "
37- timeout = " ${ lookup (var. target_groups [count . index ], " health_check_timeout" , lookup (var . target_groups_defaults , " health_check_timeout" ))} "
32+ interval = " ${ lookup (var. target_groups [count . index ], " health_check_interval" , lookup (local . target_groups_defaults , " health_check_interval" ))} "
33+ path = " ${ lookup (var. target_groups [count . index ], " health_check_path" , lookup (local . target_groups_defaults , " health_check_path" ))} "
34+ port = " ${ lookup (var. target_groups [count . index ], " health_check_port" , lookup (local . target_groups_defaults , " health_check_port" ))} "
35+ healthy_threshold = " ${ lookup (var. target_groups [count . index ], " health_check_healthy_threshold" , lookup (local . target_groups_defaults , " health_check_healthy_threshold" ))} "
36+ unhealthy_threshold = " ${ lookup (var. target_groups [count . index ], " health_check_unhealthy_threshold" , lookup (local . target_groups_defaults , " health_check_unhealthy_threshold" ))} "
37+ timeout = " ${ lookup (var. target_groups [count . index ], " health_check_timeout" , lookup (local . target_groups_defaults , " health_check_timeout" ))} "
3838 protocol = " ${ upper (lookup (var. target_groups [count . index ], " healthcheck_protocol" , lookup (var. target_groups [count . index ], " backend_protocol" )))} "
39- matcher = " ${ lookup (var. target_groups [count . index ], " health_check_matcher" , lookup (var . target_groups_defaults , " health_check_matcher" ))} "
39+ matcher = " ${ lookup (var. target_groups [count . index ], " health_check_matcher" , lookup (local . target_groups_defaults , " health_check_matcher" ))} "
4040 }
4141
4242 stickiness {
4343 type = " lb_cookie"
44- cookie_duration = " ${ lookup (var. target_groups [count . index ], " cookie_duration" , lookup (var . target_groups_defaults , " cookie_duration" ))} "
45- enabled = " ${ lookup (var. target_groups [count . index ], " stickiness_enabled" , lookup (var . target_groups_defaults , " stickiness_enabled" ))} "
44+ cookie_duration = " ${ lookup (var. target_groups [count . index ], " cookie_duration" , lookup (local . target_groups_defaults , " cookie_duration" ))} "
45+ enabled = " ${ lookup (var. target_groups [count . index ], " stickiness_enabled" , lookup (local . target_groups_defaults , " stickiness_enabled" ))} "
4646 }
4747
4848 tags = " ${ merge (var. tags , map (" Name" , lookup (var. target_groups [count . index ], " name" )))} "
0 commit comments