Skip to content

Commit 608eb2a

Browse files
Update main.tf
Co-authored-by: Anton Babenko <[email protected]>
1 parent 73a3c2e commit 608eb2a

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
@@ -66,7 +66,7 @@ resource "aws_vpc_block_public_access_options" "this" {
6666
}
6767

6868
resource "aws_vpc_block_public_access_exclusion" "this" {
69-
for_each = var.vpc_block_public_access_exclusions
69+
for_each = {for k, v in var.vpc_block_public_access_exclusions: k => v if local.create_vpc}
7070

7171
vpc_id = lookup(each.value, "exclude_vpc", false) ? local.vpc_id : null
7272

0 commit comments

Comments
 (0)