-
Notifications
You must be signed in to change notification settings - Fork 1
/
route.tf
21 lines (19 loc) · 893 Bytes
/
route.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
resource "azurerm_route_table" "internal" {
depends_on = [azurerm_virtual_machine.fgtvm]
name = "InternalRouteTable1"
location = azurerm_resource_group.myterraformgroup.location
resource_group_name = azurerm_resource_group.myterraformgroup.name
}
resource "azurerm_route" "default" {
name = "default"
resource_group_name = azurerm_resource_group.myterraformgroup.name
route_table_name = azurerm_route_table.internal.name
address_prefix = "0.0.0.0/0"
next_hop_type = "VirtualAppliance"
next_hop_in_ip_address = azurerm_network_interface.fgtport2.private_ip_address
}
resource "azurerm_subnet_route_table_association" "internalassociate" {
depends_on = [azurerm_route_table.internal]
subnet_id = azurerm_subnet.privatesubnet.id
route_table_id = azurerm_route_table.internal.id
}