Skip to content

Commit 126ea65

Browse files
authored
Feature/expose health check grace period seconds (#4)
* feat: add support for passing in grace period
1 parent 13a0a86 commit 126ea65

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ resource "aws_ecs_service" "service" {
137137
launch_type = "FARGATE"
138138
deployment_minimum_healthy_percent = 50
139139
deployment_maximum_percent = 200
140+
health_check_grace_period_seconds = "${var.health_check_grace_period_seconds}"
140141

141142
network_configuration {
142143
subnets = ["${var.private_subnet_ids}"]

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ variable "health_check" {
8080
type = "map"
8181
}
8282

83+
variable "health_check_grace_period_seconds" {
84+
default = "300"
85+
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."
86+
}
87+
8388
variable "tags" {
8489
description = "A map of tags (key-value pairs) passed to resources."
8590
type = "map"

0 commit comments

Comments
 (0)