Skip to content

Commit

Permalink
Update net.tf (#67)
Browse files Browse the repository at this point in the history
In order to allow internet outbound from the target instance, the NAT gateways should be in the public subnets.
#53
  • Loading branch information
thierryturpin authored Apr 6, 2022
1 parent 1c450bf commit 584e111
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deployment/aws/aws/net.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ resource "aws_eip" "nat" {
}

resource "aws_nat_gateway" "private" {
count = var.num_subnets_private
subnet_id = aws_subnet.private.*.id[count.index]
count = var.num_subnets_public
subnet_id = aws_subnet.public.*.id[count.index]
allocation_id = aws_eip.nat.*.id[count.index]
tags = local.tags
}
Expand Down

0 comments on commit 584e111

Please sign in to comment.