Skip to content

Commit

Permalink
Add health check grace period for newly deployed service
Browse files Browse the repository at this point in the history
  • Loading branch information
Sumit Sarkar committed Feb 18, 2019
1 parent 50d3d79 commit 4529813
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ resource "aws_ecs_service" "main" {
deployment_minimum_healthy_percent = "${var.deployment_min_healthy_percent}"
deployment_maximum_percent = "${var.deployment_max_percent}"

health_check_grace_period_seconds = "${var.health_check_grace_period}"
ordered_placement_strategy = ["${var.ordered_placement_strategies}"]
placement_constraints = ["${var.placement_constraints}"]

Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ variable "deployment_max_percent" {
description = "The upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment."
}

variable "health_check_grace_period" {
default = 60
description = "Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 7200. Only valid for services configured to use load balancers."
}

variable "healthy_threshold" {
default = 3
description = "Number of times the healthcheck should pass to mark the task as Healthy."
Expand Down

0 comments on commit 4529813

Please sign in to comment.