-
Notifications
You must be signed in to change notification settings - Fork 0
/
route.tf
35 lines (28 loc) · 910 Bytes
/
route.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
resource "aws_route_table" "public-subnet-in-us-east-1" {
vpc_id = "${aws_vpc.default.id}"
route {
cidr_block = "0.0.0.0/0"
gateway_id = "${aws_internet_gateway.default.id}"
}
tags {
Name = "Linoxide Public Subnet"
}
}
resource "aws_route_table_association" "public-subnet-in-us-east-1-association" {
subnet_id = "${aws_subnet.public-subnet-in-us-east-1.id}"
route_table_id = "${aws_route_table.public-subnet-in-us-east-1.id}"
}
resource "aws_route_table" "private-subnet-us-east-1" {
vpc_id = "${aws_vpc.default.id}"
route {
cidr_block = "0.0.0.0/0"
instance_id = "${aws_instance.nat.id}"
}
tags {
Name = "Linoxide Private Subnet"
}
}
resource "aws_route_table_association" "private-subnet-us-east-1-association" {
subnet_id = "${aws_subnet.private-subnet-us-east-1.id}"
route_table_id = "${aws_route_table.private-subnet-us-east-1.id}"
}