Skip to content

Commit caa81b8

Browse files
committed
Remove NAT instance (#4173)
1 parent 7a7d591 commit caa81b8

File tree

5 files changed

+0
-145
lines changed

5 files changed

+0
-145
lines changed

infrastructure/global/vpc/endpoints.tf

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ resource "aws_vpc_endpoint" "s3" {
33
service_name = "com.amazonaws.eu-central-1.s3"
44
vpc_endpoint_type = "Gateway"
55
route_table_ids = concat(
6-
[for route in aws_route_table.private : route.id],
76
[for route in aws_route_table.public : route.id]
87
)
98
}

infrastructure/global/vpc/nat.tf

-104
This file was deleted.

infrastructure/global/vpc/nat_instance_user_data.sh

-14
This file was deleted.

infrastructure/global/vpc/private_subnet.tf

-24
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,3 @@ resource "aws_subnet" "private" {
1010
AZ = each.key
1111
}
1212
}
13-
14-
resource "aws_route_table" "private" {
15-
for_each = toset(keys(local.private_azs_cidr))
16-
vpc_id = aws_vpc.default.id
17-
18-
route {
19-
cidr_block = "0.0.0.0/0"
20-
network_interface_id = aws_instance.nat_instance.primary_network_interface_id
21-
}
22-
23-
tags = {
24-
Name = "private subnet route table ${each.value}"
25-
}
26-
27-
depends_on = [
28-
aws_instance.nat_instance
29-
]
30-
}
31-
32-
resource "aws_route_table_association" "private_subnet_to_private_route" {
33-
for_each = toset(keys(local.private_azs_cidr))
34-
route_table_id = aws_route_table.private[each.value].id
35-
subnet_id = aws_subnet.private[each.value].id
36-
}

infrastructure/global/vpc/public_subnet.tf

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ resource "aws_route_table_association" "public_subnet_to_public_route" {
3636
subnet_id = aws_subnet.public[each.value].id
3737
}
3838

39-
# Internet gateway
40-
4139
resource "aws_internet_gateway" "default" {
4240
vpc_id = aws_vpc.default.id
4341
}

0 commit comments

Comments
 (0)