Skip to content

Commit

Permalink
Use simpler for_each for in nested dynamic authorization_config block.
Browse files Browse the repository at this point in the history
  • Loading branch information
dumptruckman committed Sep 29, 2023
1 parent 415d102 commit 068fb5c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,11 @@ resource "aws_ecs_task_definition" "main_task" {
transit_encryption_port = volume.value.transit_encryption_port

dynamic "authorization_config" {
for_each = [for a in volume.value.authorization_config : {
access_point_id = a.access_point_id
iam = coalesce(a.iam, "DISABLED")
}]
for_each = volume.value.authorization_config

content {
access_point_id = authorization_config.value.access_point_id
iam = authorization_config.value.iam
access_point_id = authorization_config.value["access_point_id"]
iam = authorization_config.value["iam"]
}
}
}
Expand Down

0 comments on commit 068fb5c

Please # to comment.