github.com/atsaki/terraform@v0.4.3-0.20150919165407-25bba5967654/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 * `next_hop_vpn_gateway` - (Optional) The name of the VPN to route to if this 58 route is matched. 59 60 * `priority` - (Required) The priority of this route, used to break ties. 61 62 * `tags` - (Optional) The tags that this route applies to. 63 64 ## Attributes Reference 65 66 The following attributes are exported: 67 68 * `name` - The name of the resource. 69 * `dest_range` - The destination CIDR block of this route. 70 * `network` - The name of the network of this route. 71 * `next_hop_ip` - The IP address of the next hop, if available. 72 * `next_hop_instance` - The name of the instance of the next hop, if available. 73 * `next_hop_instance_zone` - The zone of the next hop instance, if available. 74 * `next_hop_gateway` - The name of the next hop gateway, if available. 75 * `next_hop_network` - The name of the next hop network, if available. 76 * `priority` - The priority of this route. 77 * `tags` - The tags this route applies to.