diff --git a/blue-green/main.tf b/blue-green/main.tf index f702a52..c4648be 100644 --- a/blue-green/main.tf +++ b/blue-green/main.tf @@ -22,6 +22,7 @@ module "blue" { health_check_grace_period = "${var.health_check_grace_period}" termination_policies = ["${var.termination_policies}"] target_group_arns = "${var.target_group_arns}" + health_check_type = "${var.health_check_type}" } module "green" { @@ -48,4 +49,5 @@ module "green" { health_check_grace_period = "${var.health_check_grace_period}" termination_policies = ["${var.termination_policies}"] target_group_arns = "${var.target_group_arns}" + health_check_type = "${var.health_check_type}" } diff --git a/blue-green/variables.tf b/blue-green/variables.tf index 6d92539..bdebe17 100644 --- a/blue-green/variables.tf +++ b/blue-green/variables.tf @@ -110,3 +110,8 @@ variable "target_group_arns" { description = "A list of aws_alb_target_group ARNs, for use with Application Load Balancing" default = [] } + +variable "health_check_type" { + description = "The health check type to apply to the Autoscaling groups." + default = "ELB" +} diff --git a/single-stack/main.tf b/single-stack/main.tf index a0502f7..7684846 100644 --- a/single-stack/main.tf +++ b/single-stack/main.tf @@ -26,7 +26,7 @@ resource "aws_autoscaling_group" "bluegreen_asg" { max_size = "${var.max_size}" min_size = "${var.min_size}" desired_capacity = "${var.desired_capacity}" - health_check_type = "ELB" + health_check_type = "${var.health_check_type}" health_check_grace_period = "${var.health_check_grace_period}" termination_policies = ["${var.termination_policies}"] target_group_arns = ["${var.target_group_arns}"] diff --git a/single-stack/variables.tf b/single-stack/variables.tf index e67b2b8..a466454 100644 --- a/single-stack/variables.tf +++ b/single-stack/variables.tf @@ -98,3 +98,8 @@ variable "target_group_arns" { description = "A list of aws_alb_target_group ARNs, for use with Application Load Balancing" default = [] } + +variable "health_check_type" { + description = "The health check type to apply to the Autoscaling group." + default = "ELB" +}