File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -175,10 +175,32 @@ resource "aws_ecs_task_definition" "ecs_task_definition" {
175
175
ipc_mode = " ${ var . ipc_mode } "
176
176
network_mode = " ${ var . network_mode } "
177
177
pid_mode = " ${ var . pid_mode } "
178
- placement_constraints = " ${ var . placement_constraints } "
179
178
requires_compatibilities = " ${ var . requires_compatibilities } "
180
179
task_role_arn = " ${ var . task_role_arn } "
181
- volume = " ${ var . volumes } "
180
+
181
+ dynamic "volume" {
182
+ for_each = [for v in var . volumes : {
183
+ name = v.name
184
+ host_path = v.host_path
185
+ }]
186
+
187
+ content {
188
+ name = volume. value . name
189
+ host_path = volume. value . host_path
190
+ }
191
+ }
192
+
193
+ dynamic "placement_constraints" {
194
+ for_each = [for v in var . placement_constraints : {
195
+ type = v.type
196
+ expression = v.expression
197
+ }]
198
+
199
+ content {
200
+ type = volume. value . type
201
+ expression = volume. value . expression
202
+ }
203
+ }
182
204
183
205
count = " ${ var . register_task_definition ? 1 : 0 } "
184
206
}
You can’t perform that action at this time.
0 commit comments