Skip to content

Commit

Permalink
Allow for var.subnet_ids to be an empty list in data.aws_subnet.this
Browse files Browse the repository at this point in the history
  • Loading branch information
gbarna-bd committed Nov 1, 2023
1 parent 7178840 commit 2ff5bfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data "aws_subnet" "this" {
for_each = toset(var.subnet_ids)
for_each = toset(length(var.subnet_ids) > 0 ? var.subnet_ids : [])
id = each.value
}

Expand Down

0 comments on commit 2ff5bfb

Please sign in to comment.