diff --git a/_variables.tf b/_variables.tf index 4e605fa..1eb3734 100644 --- a/_variables.tf +++ b/_variables.tf @@ -94,3 +94,12 @@ variable "target_group_arns" { type = "list" description = "List of target groups for ASG to register" } +variable "autoscaling_health_check_grace_period" { + default = 300 + description = "The length of time that Auto Scaling waits before checking an instance's health status. The grace period begins when an instance comes into service" +} + +variable "autoscaling_default_cooldown" { + default = 300 + description = "The amount of time, in seconds, after a scaling activity completes before another scaling activity can start" +} \ No newline at end of file diff --git a/asg.tf b/asg.tf index 8565b9b..badfddc 100644 --- a/asg.tf +++ b/asg.tf @@ -38,7 +38,8 @@ resource "aws_autoscaling_group" "ecs" { ] target_group_arns = var.target_group_arns - + health_check_grace_period = var.autoscaling_health_check_grace_period + default_cooldown = var.autoscaling_default_cooldown lifecycle { create_before_destroy = true }