Skip to content

Commit

Permalink
Merge pull request #120 from dxw/fix-container-volumes
Browse files Browse the repository at this point in the history
Fix contaniner for loops
  • Loading branch information
Stretch96 authored Jun 28, 2024
2 parents 5ada99a + 86e697f commit a503c44
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ecs-cluster-infrastructure-service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,14 @@ resource "aws_ecs_task_definition" "infrastructure_ecs_cluster_service" {
container_port = each.value["container_port"] != null ? each.value["container_port"] : 0
extra_hosts = each.value["container_extra_hosts"] != null ? jsonencode([
for extra_host in each.value["container_extra_hosts"] : {
hostname = extra_host.value["hostname"],
ipAddress = extra_host.value["ip_address"]
hostname = extra_host["hostname"],
ipAddress = extra_host["ip_address"]
}
]) : "[]"
volumes = each.value["container_volumes"] != null ? jsonencode([
for volume in each.value["container_volumes"] : {
sourceVolume = volume.value["name"],
containerPath = volume.value["container_path"]
sourceVolume = volume["name"],
containerPath = volume["container_path"]
}
]) : "[]"
linux_parameters = each.value["enable_execute_command"] == true ? jsonencode({
Expand Down

0 comments on commit a503c44

Please sign in to comment.