From 082871d3b169503d7deb8364b1a96675269f74b4 Mon Sep 17 00:00:00 2001 From: Samuli Saarinen Date: Mon, 21 Jan 2019 12:31:48 +0200 Subject: [PATCH] Expose aws_ecs_service health_check_grace_period_seconds (#19) * Expose aws_ecs_service health_check_grace_period_seconds * Add type to health_check_grace_period_seconds --- main.tf | 1 + variables.tf | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/main.tf b/main.tf index 7b657244..d1a0e510 100644 --- a/main.tf +++ b/main.tf @@ -181,6 +181,7 @@ resource "aws_ecs_service" "default" { desired_count = "${var.desired_count}" deployment_maximum_percent = "${var.deployment_maximum_percent}" deployment_minimum_healthy_percent = "${var.deployment_minimum_healthy_percent}" + health_check_grace_period_seconds = "${var.health_check_grace_period_seconds}" launch_type = "${var.launch_type}" cluster = "${var.ecs_cluster_arn}" tags = "${module.default_label.tags}" diff --git a/variables.tf b/variables.tf index 332fed98..334248be 100644 --- a/variables.tf +++ b/variables.tf @@ -107,3 +107,9 @@ variable "deployment_minimum_healthy_percent" { description = "The lower limit (as a percentage of `desired_count`) of the number of tasks that must remain running and healthy in a service during a deployment" default = 100 } + +variable "health_check_grace_period_seconds" { + type = "string" + 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." + default = 0 +}