From 126ea65db8d18303bae423f73bbf4ff6f32f7676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rickard=20L=C3=B6fstr=C3=B6m?= Date: Tue, 7 Aug 2018 15:30:15 +0200 Subject: [PATCH] Feature/expose health check grace period seconds (#4) * feat: add support for passing in grace period --- main.tf | 1 + variables.tf | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/main.tf b/main.tf index 5565a32..2bbb646 100644 --- a/main.tf +++ b/main.tf @@ -137,6 +137,7 @@ resource "aws_ecs_service" "service" { launch_type = "FARGATE" deployment_minimum_healthy_percent = 50 deployment_maximum_percent = 200 + health_check_grace_period_seconds = "${var.health_check_grace_period_seconds}" network_configuration { subnets = ["${var.private_subnet_ids}"] diff --git a/variables.tf b/variables.tf index bef828a..6458b2c 100644 --- a/variables.tf +++ b/variables.tf @@ -80,6 +80,11 @@ variable "health_check" { type = "map" } +variable "health_check_grace_period_seconds" { + default = "300" + 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 "tags" { description = "A map of tags (key-value pairs) passed to resources." type = "map"