Skip to content

Commit 3fc9d05

Browse files
committed
fix ternary operator not being falsy, so use lookup
1 parent 743b2d1 commit 3fc9d05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ resource "aws_ecs_task_definition" "task" {
3232
for_each = [for efs_vol in var.efs_volumes : {
3333
name = "${var.cluster_name}-${efs_vol.efs_id}"
3434
efs_id = efs_vol.efs_id
35-
root_directory = efs_vol.root_dir ? efs_vol.root_dir : "/opt/data"
35+
root_directory = lookup(efs_vol, "root_dir", "/opt/data")
3636
}]
3737

3838
content {

0 commit comments

Comments
 (0)