Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #83 from EFXCIA/feature/elb-health
Browse files Browse the repository at this point in the history
Adding optional health_check_port variable to vault-elb
  • Loading branch information
brikis98 committed Aug 12, 2018
2 parents 873434f + e672c95 commit 6a4033d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/vault-elb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ resource "aws_elb" "vault" {
}

health_check {
target = "${var.health_check_protocol}:${var.vault_api_port}${var.health_check_path}"
target = "${var.health_check_protocol}:${var.health_check_port == 0 ? var.vault_api_port : var.health_check_port}${var.health_check_path}"
interval = "${var.health_check_interval}"
healthy_threshold = "${var.health_check_healthy_threshold}"
unhealthy_threshold = "${var.health_check_unhealthy_threshold}"
Expand Down
5 changes: 5 additions & 0 deletions modules/vault-elb/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ variable "health_check_path" {
default = "/v1/sys/health?standbyok=true"
}

variable "health_check_port" {
description = "The port to use for health checks if not vault_api_port."
default = 0
}

variable "health_check_interval" {
description = "The amount of time, in seconds, between health checks."
default = 15
Expand Down

0 comments on commit 6a4033d

Please sign in to comment.