Skip to content

Commit 004f320

Browse files
author
Steven Nemetz
committed
Allow setting NLB healthcheck path
1 parent 1c39271 commit 004f320

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ resource "aws_lb_target_group" "network" {
299299
healthy_threshold = "${var.health_check_healthy_threshold}"
300300
unhealthy_threshold = "${var.health_check_unhealthy_threshold}"
301301
protocol = "${var.health_check_protocol}"
302-
timeout = "6"
303-
path = "/"
302+
timeout = "6" # "${var.health_check_timeout}"
303+
path = "${var.health_check_path}"
304304
matcher = "200-399"
305305
}
306306
tags = "${module.label.tags}"

test/main.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ module "lb-tcp" {
2727
#attributes = ["role", "policy", "use", ""]
2828
#tags = "${map("Key", "Value")}"
2929
#enabled = false
30-
#health_check_path = ""
31-
security_groups = ["sg-a5bf1cd8"] # Need at least 1
30+
health_check_path = "/healthcheck"
31+
health_check_port = "3199"
32+
security_groups = ["sg-bef0a5c2"] # Need at least 1
3233
lb_protocols = ["HTTP","HTTPS"]
3334
type = "network"
3435
subnets = "${data.aws_subnet_ids.private_subnet_ids.ids}"
@@ -50,7 +51,7 @@ module "lb-http" {
5051
#tags = "${map("Key", "Value")}"
5152
#enabled = false
5253
#health_check_path = ""
53-
security_groups = ["sg-a5bf1cd8"] # Need at least 1
54+
security_groups = ["sg-bef0a5c2"] # Need at least 1
5455
lb_protocols = ["HTTP"]
5556
#type = "network"
5657
subnets = "${data.aws_subnet_ids.private_subnet_ids.ids}"
@@ -74,7 +75,7 @@ module "lb-https" {
7475
#health_check_path = ""
7576
internal = false # PUBLIC
7677
#security_groups = ["sg-a5bf1cd8"] # Need at least 1
77-
security_groups = ["sg-422c923e"] # PUBLIC -> use whitelist SG
78+
security_groups = ["sg-bef0a5c2"] # PUBLIC -> use whitelist SG
7879
lb_protocols = ["HTTPS"]
7980
#type = "network"
8081
#subnets = "${data.aws_subnet_ids.private_subnet_ids.ids}"

0 commit comments

Comments
 (0)