github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/azurerm/r/route_table.html.markdown (about) 1 --- 2 layout: "azurerm" 3 page_title: "Azure Resource Manager: azurerm_route_table" 4 sidebar_current: "docs-azurerm-resource-network-route-table" 5 description: |- 6 Creates a new Route Table Resource 7 --- 8 9 # azurerm\_route\_table 10 11 Creates a new Route Table 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 = "acceptanceTestSecurityGroup1" 23 location = "West US" 24 resource_group_name = "${azurerm_resource_group.test.name}" 25 26 route { 27 name = "route1" 28 address_prefix = "10.1.0.0/16" 29 next_hop_type = "vnetlocal" 30 } 31 32 tags { 33 environment = "Production" 34 } 35 } 36 ``` 37 38 ## Argument Reference 39 40 The following arguments are supported: 41 42 * `name` - (Required) The name of the route table. Changing this forces a 43 new resource to be created. 44 45 * `resource_group_name` - (Required) The name of the resource group in which to 46 create the route table. 47 48 * `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. 49 50 * `route` - (Optional) Can be specified multiple times to define multiple 51 routes. Each `route` block supports fields documented below. 52 53 * `tags` - (Optional) A mapping of tags to assign to the resource. 54 55 The `route` block supports: 56 57 * `name` - (Required) The name of the route. 58 59 * `address_prefix` - (Required) The destination CIDR to which the route applies, such as 10.1.0.0/16 60 61 * `next_hop_type` - (Required) The type of Azure hop the packet should be sent to. 62 Possible values are VirtualNetworkGateway, VnetLocal, Internet, VirtualAppliance and None 63 64 * `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. 65 66 ## Attributes Reference 67 68 The following attributes are exported: 69 70 * `id` - The Route Table ID. 71 * `subnets` - The collection of Subnets associated with this route table. 72 73 ## Import 74 75 76 Route Tables can be imported using the `resource id`, e.g. 77 ``` 78 terraform import azurerm_route_table.test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/routeTables/mytable1 79 ```