Skip to content

Commit 39f66dc

Browse files
authored
Add slow_start parameter to ecs-service-with-alb (#151)
1 parent 7fcf733 commit 39f66dc

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

aws-ecs-service/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ service = false` argument can be removed.
166166
| registry\_secretsmanager\_arn | ARN for AWS Secrets Manager secret for credentials to private registry | string | `null` | no |
167167
| route53\_zone\_id | Zone in which to create an alias record to the ALB. | string | n/a | yes |
168168
| service | Service for tagging and naming. See [doc](../README.md#consistent-tagging). | string | n/a | yes |
169+
| slow_start | Seconds for targets to warm up before the load balancer sends them a full share of requests. | number | 60 | no |
169170
| ssl\_policy | ELB policy to determine which SSL/TLS encryption protocols are enabled. Probably don't touch this. | string | `null` | no |
170171
| subdomain | Subdomain in the zone. Final domain name will be subdomain.zone | string | n/a | yes |
171172
| tag\_service | Apply cost tags to the ECS service. Only specify false for backwards compatibility with old ECS services. | bool | `true` | no |

aws-ecs-service/alb.tf

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ resource "aws_lb_target_group" "service" {
1515
target_type = var.awsvpc_network_mode ? "ip" : "instance"
1616

1717
deregistration_delay = 60
18+
slow_start = var.slow_start
1819

1920
health_check {
2021
path = var.health_check_path

aws-ecs-service/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,9 @@ variable "ordered_placement_strategy" {
196196
default = []
197197
description = "Placement strategy for the task instances."
198198
}
199+
200+
variable "slow_start" {
201+
description = "Seconds for targets to warm up before the load balancer sends them a full share of requests. 30-900 seconds or 0 to disable."
202+
type = number
203+
default = 60
204+
}

0 commit comments

Comments
 (0)