Skip to content

Commit

Permalink
Respect "enabled" for public subnets
Browse files Browse the repository at this point in the history
Previously, var.context.enabled / var.enabled was ignored, and public
subnets were always created.
  • Loading branch information
alexjurkiewicz committed Feb 18, 2021
1 parent f23b15e commit 56a4d6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

resource "aws_subnet" "public" {
count = local.availability_zones_count
count = local.enabled ? local.availability_zones_count : 0
vpc_id = join("", data.aws_vpc.default.*.id)
availability_zone = element(var.availability_zones, count.index)

Expand Down

0 comments on commit 56a4d6d

Please sign in to comment.