Skip to content
Permalink
Browse files

Health port variable (#80)

* health check port as variable for alb_handling

* health port as variable
  • Loading branch information
ivanmartos authored and maartenvanderhoef committed Sep 23, 2019
1 parent 2d4af19 commit b520b6d0f6228f4d6f61ed03df47751a56abc780
Showing with 14 additions and 0 deletions.
  1. +3 −0 main.tf
  2. +1 −0 modules/alb_handling/main.tf
  3. +5 −0 modules/alb_handling/variables.tf
  4. +5 −0 variables.tf
@@ -124,6 +124,9 @@ module "alb_handling" {
# health_uri defines which health-check uri the target group needs to check on for health_check
health_uri = "${var.load_balancing_properties_health_uri}"

# health_port defines port of the health-check
health_port= "${var.load_balancing_properties_health_port}"

# The expected HTTP status for the health check to be marked healthy
# You can specify multiple values (for example, "200,202") or a range of values (for example, "200-299")
health_matcher = "${var.load_balancing_properties_health_matcher}"
@@ -97,6 +97,7 @@ resource "aws_lb_target_group" "service" {
path = "${var.health_uri}"
unhealthy_threshold = "${var.unhealthy_threshold}"
healthy_threshold = "${var.healthy_threshold}"
port = "${var.health_port}"
}
}

@@ -79,6 +79,11 @@ variable "health_uri" {
default = ""
}

# port for the health check. Defaults to traffic-port
variable "health_port" {
default = "traffic-port"
}

# The expected HTTP status for the health check to be marked healthy
# You can specify multiple values (for example, "200,202") or a range of values (for example, "200-299")
variable "health_matcher" {
@@ -139,6 +139,11 @@ variable "load_balancing_properties_health_matcher" {
default = "200"
}

variable "load_balancing_properties_health_port" {
description = "health_port is the port of health uri to be checked by the ALB"
default = "traffic-port"
}

variable "load_balancing_properties_unhealthy_threshold" {
description = "The number of consecutive successful health checks required before considering an healthy target unhealthy"
default = "3"

0 comments on commit b520b6d

Please sign in to comment.
You can’t perform that action at this time.