Skip to content

Commit c1392c7

Browse files
committed
2 parents 85a47cb + e5bc70e commit c1392c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ resource "aws_route_table" "public" {
5656
tags = "${merge(var.tags, var.public_route_table_tags, map("Name", format("%s-public", var.name)))}"
5757
}
5858

59-
resource "aws_route" "public_internet_gateway" {
59+
resource "aws_route" "public" {
6060
count = "${length(var.public_subnets) > 0 ? 1 : 0}"
6161

6262
route_table_id = "${aws_route_table.public.id}"
@@ -68,7 +68,7 @@ resource "aws_route" "public_internet_gateway" {
6868
# Private routes
6969
#################
7070
resource "aws_route_table" "private" {
71-
count = "${length(var.azs)}"
71+
count = "${signum(length(var.private_subnets) + var.enable_nat_gateway) > 0 ? length(var.azs) : 0}"
7272

7373
vpc_id = "${aws_vpc.this.id}"
7474
propagating_vgws = ["${var.private_propagating_vgws}"]

0 commit comments

Comments
 (0)