github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/azurerm/r/route.html.markdown (about) 1 --- 2 layout: "azurerm" 3 page_title: "Azure Resource Manager: azurerm_route" 4 sidebar_current: "docs-azurerm-resource-network-route" 5 description: |- 6 Creates a new Route Resource 7 --- 8 9 # azurerm\_route 10 11 Creates a new Route Resource 12 13 ## Example Usage 14 15 ```hcl 16 resource "azurerm_resource_group" "test" { 17 name = "acceptanceTestResourceGroup1" 18 location = "West US" 19 } 20 21 resource "azurerm_route_table" "test" { 22 name = "acceptanceTestRouteTable1" 23 location = "West US" 24 resource_group_name = "${azurerm_resource_group.test.name}" 25 } 26 27 resource "azurerm_route" "test" { 28 name = "acceptanceTestRoute1" 29 resource_group_name = "${azurerm_resource_group.test.name}" 30 route_table_name = "${azurerm_route_table.test.name}" 31 32 address_prefix = "10.1.0.0/16" 33 next_hop_type = "vnetlocal" 34 } 35 ``` 36 37 ## Argument Reference 38 39 The following arguments are supported: 40 41 * `name` - (Required) The name of the route. Changing this forces a 42 new resource to be created. 43 44 * `resource_group_name` - (Required) The name of the resource group in which to 45 create the route. 46 47 48 * `route_table_name` - (Required) The name of the route table to which to create the route 49 50 * `address_prefix` - (Required) The destination CIDR to which the route applies, such as 10.1.0.0/16 51 52 * `next_hop_type` - (Required) The type of Azure hop the packet should be sent to. 53 Possible values are VirtualNetworkGateway, VnetLocal, Internet, VirtualAppliance and None 54 55 * `next_hop_in_ip_address` - (Optional) Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. 56 57 ## Attributes Reference 58 59 The following attributes are exported: 60 61 * `id` - The Route ID. 62 63 ## Import 64 65 66 Routes can be imported using the `resource id`, e.g. 67 ``` 68 terraform import azurerm_route.testRoute /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/routeTables/mytable1/routes/myroute1 69 ```