Skip to content

Commit 9e9a05b

Browse files
committed
Added var.deregistration_delay to configure allowance time for in-flight requests to complete before shutting down.
1 parent 33ace94 commit 9e9a05b

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 0.6.2 (Jan 21, 2026)
2+
* Added `var.deregistration_delay` to configure allowance time for in-flight requests to complete before shutting down.
3+
14
# 0.6.1 (Oct 02, 2025)
25
* Added an optional global accelerator to improve performance and availability for global applications.
36
* Fixed an "invalid attribute" warning in logs bucket configuration.

target-group.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ resource "aws_lb_target_group" "this" {
2828
protocol = "HTTP"
2929
target_type = "ip"
3030
vpc_id = local.vpc_id
31-
deregistration_delay = 10
31+
deregistration_delay = var.deregistration_delay
3232
tags = local.tags
3333

3434
lifecycle {

variables.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,20 @@ https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-healthchecks
6565
EOF
6666
}
6767

68+
variable "deregistration_delay" {
69+
type = number
70+
default = 10
71+
description = <<EOT
72+
Time (in seconds) that the load balancer waits before forcefully closing
73+
connections to a task after it is deregistered during a deployment or scale-down.
74+
75+
During this period, the load balancer stops sending new requests to the task
76+
but allows in-flight requests to complete. This should be long enough to cover
77+
the longest expected request time and should not exceed the ECS task
78+
stop timeout to avoid prematurely terminated requests.
79+
EOT
80+
}
81+
6882
variable "sticky_session_type" {
6983
type = string
7084
default = "off"

0 commit comments

Comments
 (0)