|
| 1 | +--- |
| 2 | +layout: "google" |
| 3 | +page_title: "Google: google_compute_forwarding_rule" |
| 4 | +sidebar_current: "docs-google-datasource-compute-forwarding-rule" |
| 5 | +description: |- |
| 6 | + Get a forwarding rule within GCE. |
| 7 | +--- |
| 8 | + |
| 9 | +# google\_compute\_forwarding\_rule |
| 10 | + |
| 11 | +Get a forwarding rule within GCE from its name. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```tf |
| 16 | +data "google_compute_forwarding_rule" "my-forwarding-rule" { |
| 17 | + name = "forwarding-rule-us-east1" |
| 18 | +} |
| 19 | +``` |
| 20 | + |
| 21 | +## Argument Reference |
| 22 | + |
| 23 | +The following arguments are supported: |
| 24 | + |
| 25 | +* `name` - (Required) The name of the forwarding rule. |
| 26 | + |
| 27 | + |
| 28 | +- - - |
| 29 | + |
| 30 | +* `project` - (Optional) The project in which the resource belongs. If it |
| 31 | + is not provided, the provider project is used. |
| 32 | + |
| 33 | +* `region` - (Optional) The region in which the resource belongs. If it |
| 34 | + is not provided, the project region is used. |
| 35 | + |
| 36 | +## Attributes Reference |
| 37 | + |
| 38 | +In addition to the arguments listed above, the following attributes are exported: |
| 39 | + |
| 40 | +* `description` - Description of this forwarding rule. |
| 41 | + |
| 42 | +* `network` - Network of this forwarding rule. |
| 43 | + |
| 44 | +* `subnetwork` - Subnetwork of this forwarding rule. |
| 45 | + |
| 46 | +* `ip_address` - IP address of this forwarding rule. |
| 47 | + |
| 48 | +* `ip_protocol` - IP protocol of this forwarding rule. |
| 49 | + |
| 50 | +* `ports` - List of ports to use for internal load balancing, if this forwarding rule has any. |
| 51 | + |
| 52 | +* `port_range` - Port range, if this forwarding rule has one. |
| 53 | + |
| 54 | +* `target` - URL of the target pool, if this forwarding rule has one. |
| 55 | + |
| 56 | +* `backend_service` - Backend service, if this forwarding rule has one. |
| 57 | + |
| 58 | +* `load_balancing_scheme` - Type of load balancing of this forwarding rule. |
| 59 | + |
| 60 | +* `region` - Region of this forwarding rule. |
| 61 | + |
| 62 | +* `self_link` - The URI of the resource. |
0 commit comments