From 69e43b49fd8e150741631447b23cc3638546fe00 Mon Sep 17 00:00:00 2001 From: maurofrigini-dnx Date: Tue, 5 Nov 2024 20:59:45 -0300 Subject: [PATCH 1/2] add idle_timeout_var and default 400 --- _variables.tf | 6 ++++++ alb.tf | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/_variables.tf b/_variables.tf index fd3b0a5..2d19670 100644 --- a/_variables.tf +++ b/_variables.tf @@ -384,3 +384,9 @@ variable "code_deploy" { default = true description = "Enables CodeDeploy role to be used for deployment" } + +variable "idle_timeout" { + type = number + default = 400 + description = "IDLE time for ALB on seconds." +} \ No newline at end of file diff --git a/alb.tf b/alb.tf index 73a500b..258e5bd 100644 --- a/alb.tf +++ b/alb.tf @@ -12,7 +12,7 @@ resource "aws_lb" "ecs" { aws_security_group.alb[0].id, ] - idle_timeout = 400 + idle_timeout = var.idle_timeout dynamic "access_logs" { for_each = compact([var.lb_access_logs_bucket]) From e771369d9912841bfb1064b35262e688a041aa54 Mon Sep 17 00:00:00 2001 From: maurofrigini-dnx Date: Wed, 6 Nov 2024 00:05:35 +0000 Subject: [PATCH 2/2] terraform-docs: automated update action --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c5e3f5c..24ca8fd 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ module "ecs_apps" { | extra\_certificate\_arns | Extra ACM certificates to add to ALB Listeners | `list(string)` | `[]` | no | | extra\_task\_policies\_arn | Extra policies to add to the task definition permissions | `list(string)` | `[]` | no | | fargate\_only | Enable when cluster is only for fargate and does not require ASG/EC2/EFS infrastructure | `bool` | `false` | no | +| idle\_timeout | IDLE time for ALB on seconds. | `number` | `400` | no | | instance\_types | Instance type for ECS workers | `list(any)` | `[]` | no | | instance\_volume\_size | Volume size for docker volume (in GB). | `number` | `30` | no | | instance\_volume\_size\_root | Volume size for root volume (in GB). | `number` | `16` | no |