Skip to content

Commit

Permalink
Allow to customize the health_check_type of the autoscaling groups
Browse files Browse the repository at this point in the history
  • Loading branch information
iuriaranda committed Jun 26, 2017
1 parent a8b44db commit 4f6c5c6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions blue-green/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand All @@ -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}"
}
5 changes: 5 additions & 0 deletions blue-green/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
2 changes: 1 addition & 1 deletion single-stack/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"]
Expand Down
5 changes: 5 additions & 0 deletions single-stack/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 4f6c5c6

Please sign in to comment.