Skip to content

Commit

Permalink
Remove NAT instance (#4173)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoacierno committed Nov 23, 2024
1 parent 7a7d591 commit caa81b8
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 145 deletions.
1 change: 0 additions & 1 deletion infrastructure/global/vpc/endpoints.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ resource "aws_vpc_endpoint" "s3" {
service_name = "com.amazonaws.eu-central-1.s3"
vpc_endpoint_type = "Gateway"
route_table_ids = concat(
[for route in aws_route_table.private : route.id],
[for route in aws_route_table.public : route.id]
)
}
104 changes: 0 additions & 104 deletions infrastructure/global/vpc/nat.tf

This file was deleted.

14 changes: 0 additions & 14 deletions infrastructure/global/vpc/nat_instance_user_data.sh

This file was deleted.

24 changes: 0 additions & 24 deletions infrastructure/global/vpc/private_subnet.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,3 @@ resource "aws_subnet" "private" {
AZ = each.key
}
}

resource "aws_route_table" "private" {
for_each = toset(keys(local.private_azs_cidr))
vpc_id = aws_vpc.default.id

route {
cidr_block = "0.0.0.0/0"
network_interface_id = aws_instance.nat_instance.primary_network_interface_id
}

tags = {
Name = "private subnet route table ${each.value}"
}

depends_on = [
aws_instance.nat_instance
]
}

resource "aws_route_table_association" "private_subnet_to_private_route" {
for_each = toset(keys(local.private_azs_cidr))
route_table_id = aws_route_table.private[each.value].id
subnet_id = aws_subnet.private[each.value].id
}
2 changes: 0 additions & 2 deletions infrastructure/global/vpc/public_subnet.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ resource "aws_route_table_association" "public_subnet_to_public_route" {
subnet_id = aws_subnet.public[each.value].id
}

# Internet gateway

resource "aws_internet_gateway" "default" {
vpc_id = aws_vpc.default.id
}

0 comments on commit caa81b8

Please sign in to comment.