github.com/adamar/terraform@v0.2.2-0.20141016210445-2e703afdad0e/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-resource-route" 5 --- 6 7 # google\_compute\_route 8 9 Manages a network route within GCE. 10 11 ## Example Usage 12 13 ``` 14 resource "google_compute_network" "foobar" { 15 name = "test" 16 ipv4_range = "10.0.0.0/16" 17 } 18 19 resource "google_compute_route" "foobar" { 20 name = "test" 21 dest_range = "15.0.0.0/24" 22 network = "${google_compute_network.foobar.name}" 23 next_hop_ip = "10.0.1.5" 24 priority = 100 25 } 26 ``` 27 28 ## Argument Reference 29 30 The following arguments are supported: 31 32 * `name` - (Required) A unique name for the resource, required by GCE. 33 Changing this forces a new resource to be created. 34 35 * `dest_range` - (Required) The destination IPv4 address range that this 36 route applies to. 37 38 * `network` - (Required) The name of the network to attach this route to. 39 40 * `next_hop_ip` - (Optional) The IP address of the next hop if this route 41 is matched. 42 43 * `next_hop_instance` - (Optional) The name of the VM instance to route to 44 if this route is matched. 45 46 * `next_hop_instance_zone` - (Optional) The zone of the instance specified 47 in `next_hop_instance`. 48 49 * `next_hop_gateway` - (Optional) The name of the internet gateway to route 50 to if this route is matched. 51 52 * `next_hop_network` - (Optional) The name of the network to route to if this 53 route is matched. 54 55 * `priority` - (Required) The priority of this route, used to break ties. 56 57 * `tags` - (Optional) The tags that this route applies to. 58 59 ## Attributes Reference 60 61 The following attributes are exported: 62 63 * `name` - The name of the resource. 64 * `dest_range` - The detination CIDR block of this route. 65 * `network` - The name of the network of this route. 66 * `next_hop_ip` - The IP address of the next hop, if available. 67 * `next_hop_instance` - The name of the instance of the next hop, if available. 68 * `next_hop_instance_zone` - The zone of the next hop instance, if available. 69 * `next_hop_gateway` - The name of the next hop gateway, if available. 70 * `next_hop_network` - The name of the next hop network, if available. 71 * `priority` - The priority of this route. 72 * `tags` - The tags this route applies to.