github.com/armen/terraform@v0.5.2-0.20150529052519-caa8117a08f1/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 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 ``` 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 * `name` - (Required) A unique name for the resource, required by GCE. 35 Changing this forces a new resource to be created. 36 37 * `dest_range` - (Required) The destination IPv4 address range that this 38 route applies to. 39 40 * `network` - (Required) The name of the network to attach this route to. 41 42 * `next_hop_ip` - (Optional) The IP address of the next hop if this route 43 is matched. 44 45 * `next_hop_instance` - (Optional) The name of the VM instance to route to 46 if this route is matched. 47 48 * `next_hop_instance_zone` - (Optional) The zone of the instance specified 49 in `next_hop_instance`. 50 51 * `next_hop_gateway` - (Optional) The name of the internet gateway to route 52 to if this route is matched. 53 54 * `next_hop_network` - (Optional) The name of the network to route to if this 55 route is matched. 56 57 * `priority` - (Required) The priority of this route, used to break ties. 58 59 * `tags` - (Optional) The tags that this route applies to. 60 61 ## Attributes Reference 62 63 The following attributes are exported: 64 65 * `name` - The name of the resource. 66 * `dest_range` - The destination CIDR block of this route. 67 * `network` - The name of the network of this route. 68 * `next_hop_ip` - The IP address of the next hop, if available. 69 * `next_hop_instance` - The name of the instance of the next hop, if available. 70 * `next_hop_instance_zone` - The zone of the next hop instance, if available. 71 * `next_hop_gateway` - The name of the next hop gateway, if available. 72 * `next_hop_network` - The name of the next hop network, if available. 73 * `priority` - The priority of this route. 74 * `tags` - The tags this route applies to.