Commit 67c1e9fc authored by Anton Babenko's avatar Anton Babenko

Fixed #177 - public_subnets should not always be validated

parent 598fbfae
...@@ -161,7 +161,7 @@ resource "aws_subnet" "public" { ...@@ -161,7 +161,7 @@ resource "aws_subnet" "public" {
count = "${var.create_vpc && length(var.public_subnets) > 0 && (!var.one_nat_gateway_per_az || length(var.public_subnets) >= length(var.azs)) ? length(var.public_subnets) : 0}" count = "${var.create_vpc && length(var.public_subnets) > 0 && (!var.one_nat_gateway_per_az || length(var.public_subnets) >= length(var.azs)) ? length(var.public_subnets) : 0}"
vpc_id = "${local.vpc_id}" vpc_id = "${local.vpc_id}"
cidr_block = "${var.public_subnets[count.index]}" cidr_block = "${element(concat(var.public_subnets, list("")), count.index)}"
availability_zone = "${element(var.azs, count.index)}" availability_zone = "${element(var.azs, count.index)}"
map_public_ip_on_launch = "${var.map_public_ip_on_launch}" map_public_ip_on_launch = "${var.map_public_ip_on_launch}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment