Skip to content

Commit

Permalink
fix: Use database route table instead of private route table for NAT …
Browse files Browse the repository at this point in the history
…gateway route (#476)
  • Loading branch information
bmickunas committed Aug 17, 2020
1 parent 83bed06 commit cb185fc
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
Expand Up @@ -255,7 +255,7 @@ resource "aws_route" "database_internet_gateway" {
resource "aws_route" "database_nat_gateway" {
count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 && false == var.create_database_internet_gateway_route && var.create_database_nat_gateway_route && var.enable_nat_gateway ? local.nat_gateway_count : 0

route_table_id = element(aws_route_table.private.*.id, count.index)
route_table_id = element(aws_route_table.database.*.id, count.index)
destination_cidr_block = "0.0.0.0/0"
nat_gateway_id = element(aws_nat_gateway.this.*.id, count.index)

Expand Down

0 comments on commit cb185fc

Please sign in to comment.