From b365f7acc8644bddf4b73f7cc343511f827b2f1f Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Fri, 7 Jun 2024 15:19:17 +0100 Subject: [PATCH] Fix ECS service grace period * Health check grace period is only valid for services configured to use load balancers --- ecs-cluster-infrastructure-service.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecs-cluster-infrastructure-service.tf b/ecs-cluster-infrastructure-service.tf index df7f632..d118004 100644 --- a/ecs-cluster-infrastructure-service.tf +++ b/ecs-cluster-infrastructure-service.tf @@ -221,7 +221,7 @@ resource "aws_ecs_service" "infrastructure_ecs_cluster_service" { } } - health_check_grace_period_seconds = each.value["container_heath_grace_period"] + health_check_grace_period_seconds = each.value["container_port"] != 0 ? each.value["container_heath_grace_period"] : null launch_type = "EC2"