Skip to content

Commit 08da776

Browse files
committed
Support custom service connect timeout
1 parent 00cc6b6 commit 08da776

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

examples/complete/main.tf

+4
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ module "ecs" {
114114
}
115115
port_name = local.container_name
116116
discovery_name = local.container_name
117+
timeout = {
118+
idle_timeout_seconds = 60
119+
per_request_timeout_seconds = 60
120+
}
117121
}
118122
}
119123

modules/service/main.tf

+9
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,15 @@ resource "aws_ecs_service" "this" {
168168
}
169169
}
170170

171+
dynamic "timeout" {
172+
for_each = try([service.value.timeout], [])
173+
174+
content {
175+
idle_timeout_seconds = try(service.value.timeout.idle_timeout_seconds, null)
176+
per_request_timeout_seconds = try(service.value.timeout.per_request_timeout_seconds, null)
177+
}
178+
}
179+
171180
discovery_name = try(service.value.discovery_name, null)
172181
ingress_port_override = try(service.value.ingress_port_override, null)
173182
port_name = service.value.port_name

0 commit comments

Comments
 (0)