Skip to content

Commit 2c37295

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

File tree

5 files changed

+0
-139
lines changed

5 files changed

+0
-139
lines changed

infrastructure/global/vpc/endpoints.tf

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 104 deletions
This file was deleted.

infrastructure/global/vpc/nat_instance_user_data.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

infrastructure/global/vpc/private_subnet.tf

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,6 @@ resource "aws_subnet" "private" {
1111
}
1212
}
1313

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-
3214
resource "aws_route_table_association" "private_subnet_to_private_route" {
3315
for_each = toset(keys(local.private_azs_cidr))
3416
route_table_id = aws_route_table.private[each.value].id

infrastructure/global/vpc/public_subnet.tf

Lines changed: 0 additions & 2 deletions
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)