Skip to content

Commit 3be813b

Browse files
committed
feat: timeout configuration for ecs service's service connect configuration
Fix incorrect syntax for fetching iterator attributes within dynamic block.
1 parent 31c4ec3 commit 3be813b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

main.tf

+12-3
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,20 @@ resource "aws_ecs_service" "this" {
106106
ingress_port_override = try(service.value.ingress_port_override, null)
107107

108108
dynamic "client_alias" {
109-
for_each = length(try(service.client_alias, {})) > 0 ? [1] : []
109+
for_each = length(try(service.value.client_alias, {})) > 0 ? [1] : []
110110

111111
content {
112-
port = service.client_alias.port
113-
dns_name = try(service.client_alias.dns_name, null)
112+
port = service.value.client_alias.port
113+
dns_name = try(service.value.client_alias.dns_name, null)
114+
}
115+
}
116+
117+
dynamic "timeout" {
118+
for_each = length(try(service.value.timeout, {})) > 0 ? [1] : []
119+
120+
content {
121+
idle_timeout_seconds = try(service.value.timeout.idle_timeout_seconds, null)
122+
per_request_timeout_seconds = try(service.value.timeout.per_request_timeout_seconds, null)
114123
}
115124
}
116125
}

0 commit comments

Comments
 (0)