Skip to content

Commit

Permalink
add instance_refresh config to asg (#54)
Browse files Browse the repository at this point in the history
* add instance_refresh config to asg
Signed-off-by: Mark Garner <[email protected]>

* add min healthy % var to variables file
Signed-off-by: Mark Garner <[email protected]>

* Update variables.tf
Co-authored-by: Daniel Hill <[email protected]>

Co-authored-by: Mark Garner <[email protected]>
Co-authored-by: Daniel Hill <[email protected]>
  • Loading branch information
3 people authored Jul 6, 2021
1 parent 9cb39ab commit 64baf12
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ resource "aws_autoscaling_group" "kong" {
ignore_changes = [load_balancers, target_group_arns]
}

instance_refresh {
strategy = "Rolling"
preferences {
min_healthy_percentage = var.min_healthy_percentage
}
}

dynamic "tag" {
for_each = local.tags
content {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -531,3 +531,9 @@ variable "target_group_arns" {
type = list(string)
default = []
}

variable "min_healthy_percentage" {
description = "(Optional) The minimum percentage of healthy instances in Auto Scaling Gorup during inastnce refresh"
type = number
default = 30
}

0 comments on commit 64baf12

Please sign in to comment.