github.com/adrian-bl/terraform@v0.7.0-rc2.0.20160705220747-de0a34fc3517/website/source/docs/providers/google/r/compute_route.html.markdown (about) 1 --- 2 layout: "google" 3 page_title: "Google: google_compute_route" 4 sidebar_current: "docs-google-compute-route" 5 description: |- 6 Manages a network route within GCE. 7 --- 8 9 # google\_compute\_route 10 11 Manages a network route within GCE. 12 13 ## Example Usage 14 15 ```js 16 resource "google_compute_network" "foobar" { 17 name = "test" 18 ipv4_range = "10.0.0.0/16" 19 } 20 21 resource "google_compute_route" "foobar" { 22 name = "test" 23 dest_range = "15.0.0.0/24" 24 network = "${google_compute_network.foobar.name}" 25 next_hop_ip = "10.0.1.5" 26 priority = 100 27 } 28 ``` 29 30 ## Argument Reference 31 32 The following arguments are supported: 33 34 * `dest_range` - (Required) The destination IPv4 address range that this 35 route applies to. 36 37 * `name` - (Required) A unique name for the resource, required by GCE. 38 Changing this forces a new resource to be created. 39 40 * `network` - (Required) The name of the network to attach this route to. 41 42 * `priority` - (Required) The priority of this route, used to break ties. 43 44 - - - 45 46 * `next_hop_gateway` - (Optional) The name of the internet gateway to route 47 to if this route is matched. 48 49 * `next_hop_instance` - (Optional) The name of the VM instance to route to 50 if this route is matched. 51 52 * `next_hop_instance_zone` - (Required when `next_hop_instance` is specified) 53 The zone of the instance specified in `next_hop_instance`. 54 55 * `next_hop_ip` - (Optional) The IP address of the next hop if this route 56 is matched. 57 58 * `next_hop_vpn_tunnel` - (Optional) The name of the VPN to route to if this 59 route is matched. 60 61 * `project` - (Optional) The project in which the resource belongs. If it 62 is not provided, the provider project is used. 63 64 * `tags` - (Optional) The tags that this route applies to. 65 66 ## Attributes Reference 67 68 In addition to the arguments listed above, the following computed attributes are 69 exported: 70 71 * `next_hop_network` - The name of the next hop network, if available. 72 73 * `self_link` - The URI of the created resource.