github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/google/r/compute_forwarding_rule.html.markdown (about) 1 --- 2 layout: "google" 3 page_title: "Google: google_compute_forwarding_rule" 4 sidebar_current: "docs-google-compute-forwarding-rule" 5 description: |- 6 Manages a Forwarding Rule within GCE. 7 --- 8 9 # google\_compute\_forwarding\_rule 10 11 Manages a Forwarding Rule within GCE. This binds an ip and port range to a target pool. For more 12 information see [the official 13 documentation](https://cloud.google.com/compute/docs/load-balancing/network/forwarding-rules) and 14 [API](https://cloud.google.com/compute/docs/reference/latest/forwardingRules). 15 16 ## Example Usage 17 18 ```tf 19 resource "google_compute_forwarding_rule" "default" { 20 name = "test" 21 target = "${google_compute_target_pool.default.self_link}" 22 port_range = "80" 23 } 24 ``` 25 26 ## Argument Reference 27 28 The following arguments are supported: 29 30 * `name` - (Required) A unique name for the resource, required by GCE. Changing 31 this forces a new resource to be created. 32 33 - - - 34 35 * `backend_service` - (Optional) BackendService resource to receive the 36 matched traffic. Only used for internal load balancing. 37 38 * `description` - (Optional) Textual description field. 39 40 * `ip_address` - (Optional) The static IP. (if not set, an ephemeral IP is 41 used). 42 43 * `ip_protocol` - (Optional) The IP protocol to route, one of "TCP" "UDP" "AH" 44 "ESP" or "SCTP" for external load balancing, "TCP" or "UDP" for internal 45 (default "TCP"). 46 47 * `load_balancing_scheme` - (Optional) Type of load balancing to use. Can be 48 set to "INTERNAL" or "EXTERNAL" (default "EXTERNAL"). 49 50 * `network` - (Optional) Network that the load balanced IP should belong to. 51 Only used for internal load balancing. If it is not provided, the default 52 network is used. 53 54 * `port_range` - (Optional) A range e.g. "1024-2048" or a single port "1024" 55 (defaults to all ports!). Only used for external load balancing. 56 57 * `ports` - (Optional) A list of ports (maximum of 5) to use for internal load 58 balancing. Packets addressed to these ports will be forwarded to the backends 59 configured with this forwarding rule. Required for internal load balancing. 60 61 * `project` - (Optional) The project in which the resource belongs. If it 62 is not provided, the provider project is used. 63 64 * `region` - (Optional) The Region in which the created address should reside. 65 If it is not provided, the provider region is used. 66 67 * `subnetwork` - (Optional) Subnetwork that the load balanced IP should belong 68 to. Only used for internal load balancing. Must be specified if the network 69 is in custom subnet mode. 70 71 * `target` - (Optional) URL of target pool. Required for external load 72 balancing. 73 74 ## Attributes Reference 75 76 In addition to the arguments listed above, the following computed attributes are 77 exported: 78 79 * `self_link` - The URI of the created resource.