-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroute_table_private.tf
35 lines (30 loc) · 994 Bytes
/
route_table_private.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" "private" {
vpc_id = aws_vpc.main.id
route {
cidr_block = "0.0.0.0/0"
nat_gateway_id = aws_nat_gateway.nat.id
carrier_gateway_id = ""
destination_prefix_list_id = ""
egress_only_gateway_id = ""
gateway_id = ""
local_gateway_id = ""
network_interface_id = ""
transit_gateway_id = ""
vpc_endpoint_id = ""
vpc_peering_connection_id = ""
}
tags = {
Name = "private",
App = var.application_name,
Environment = var.environment,
OwnerTeam = var.owner_team
}
}
resource "aws_route_table_association" "private-us-east-1a" {
subnet_id = aws_subnet.private-availability-zone-one.id
route_table_id = aws_route_table.private.id
}
resource "aws_route_table_association" "private-us-east-1b" {
subnet_id = aws_subnet.private-availability-zone-two.id
route_table_id = aws_route_table.private.id
}