Skip to content

Commit 3c41d58

Browse files
Merge pull request #2 from gaussb-labs/fix/update-alb-healthcheck-var-name
BREAKING CHANGE: Rename healthcheck parameters in target group of alb
2 parents 72ffb66 + a784aeb commit 3c41d58

File tree

2 files changed

+27
-18
lines changed

2 files changed

+27
-18
lines changed

main.tf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ resource "aws_lb_target_group" "app" {
3131
protocol = "HTTP"
3232
vpc_id = var.vpc_id
3333
health_check {
34-
enabled = var.target_group_app_enabled
35-
healthy_threshold = var.target_group_app_healthy_threshold
36-
unhealthy_threshold = var.target_group_app_unhealthy_threshold
37-
interval = var.target_group_app_interval
38-
matcher = var.target_group_app_matcher
39-
path = var.target_group_app_path
40-
port = var.target_group_app_port
41-
protocol = var.target_group_app_protocol
42-
timeout = var.target_group_app_timeout
34+
enabled = var.target_group_healthcheck_enabled
35+
healthy_threshold = var.target_group_healthcheck_healthy_threshold
36+
unhealthy_threshold = var.target_group_healthcheck_unhealthy_threshold
37+
interval = var.target_group_healthcheck_interval
38+
matcher = var.target_group_healthcheck_matcher
39+
path = var.target_group_healthcheck_path
40+
port = var.target_group_healthcheck_port
41+
protocol = var.target_group_healthcheck_protocol
42+
timeout = var.target_group_healthcheck_timeout
4343
}
4444
tags = {
4545
"Name" = "${var.environment}-${local.target_group_app_name}"

variables.tf

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,46 +54,55 @@ variable "alb_access_logs_bucket_name" {
5454
type = string
5555
description = "S3 bucket name which will be used to store load balancer access logs. Prefix <var.environment> will be added. The bucket name should be unique globally."
5656
}
57-
variable "target_group_app_enabled" {
57+
58+
variable "target_group_healthcheck_enabled" {
5859
type = bool
5960
description = "Enable /Disable target health check."
6061
default = true
6162
}
62-
variable "target_group_app_healthy_threshold" {
63+
64+
variable "target_group_healthcheck_healthy_threshold" {
6365
type = number
6466
description = "Number of consecutive health checks successes required before considering an unhealthy target healthy."
6567
default = 3
6668
}
67-
variable "target_group_app_unhealthy_threshold" {
69+
70+
variable "target_group_healthcheck_unhealthy_threshold" {
6871
type = number
6972
description = "Number of consecutive health check failures required before considering the target unhealthy."
7073
default = 3
7174
}
72-
variable "target_group_app_interval" {
75+
76+
variable "target_group_healthcheck_interval" {
7377
type = number
7478
description = "Approximate amount of time, in seconds, between health checks of an individual target."
7579
default = 30
7680
}
77-
variable "target_group_app_matcher" {
81+
82+
variable "target_group_healthcheck_matcher" {
7883
type = string
7984
description = "Response codes to use when checking for a healthy responses from a target."
8085
}
81-
variable "target_group_app_path" {
86+
87+
variable "target_group_healthcheck_path" {
8288
type = string
8389
description = "Destination for the health check request."
8490
}
85-
variable "target_group_app_port" {
91+
92+
variable "target_group_healthcheck_port" {
8693
type = string
8794
description = "Port to use to connect with the target."
8895
default = "traffic-port"
8996
}
90-
variable "target_group_app_protocol" {
97+
98+
variable "target_group_healthcheck_protocol" {
9199
type = string
92100
description = "Protocol to use to connect with the target."
93101
default = "HTTP"
94102

95103
}
96-
variable "target_group_app_timeout" {
104+
105+
variable "target_group_healthcheck_timeout" {
97106
type = number
98107
description = "Amount of time, in seconds, during which no response means a failed health check."
99108
default = 5

0 commit comments

Comments
 (0)