Skip to content

Commit

Permalink
remove optional tcp healthcheck, no longer used
Browse files Browse the repository at this point in the history
  • Loading branch information
kenoir committed Jan 25, 2024
1 parent cb73165 commit e72e611
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
20 changes: 4 additions & 16 deletions terraform/modules/service/target_group.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,10 @@ resource "aws_lb_target_group" "tcp" {
# updated service. Reducing this parameter to 90s makes deployments faster.
deregistration_delay = 90

dynamic "health_check" {
for_each = var.tcp_healthcheck == false ? toset([]) : toset([1])

content {
protocol = "TCP"
}
}

dynamic "health_check" {
for_each = var.tcp_healthcheck == true ? toset([]) : toset([1])

content {
protocol = "HTTP"
path = var.healthcheck_path
matcher = "200"
}
health_check {
protocol = "HTTP"
path = var.healthcheck_path
matcher = "200"
}
}

Expand Down
7 changes: 0 additions & 7 deletions terraform/modules/service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,7 @@ variable "app_memory" {
type = number
}

variable "tcp_healthcheck" {
# TODO: Remove this when all services use HTTP healthcheck
type = bool
default = true
}

variable "healthcheck_path" {
# Note: this is only used when tcp_healthcheck is set to false
type = string
default = "/management/healthcheck"
}
Expand Down

0 comments on commit e72e611

Please sign in to comment.