Skip to content

Commit e083952

Browse files
jphalipnat-henderson
authored andcommitted
Add data source for forwarding rule (hashicorp#1078)
1 parent 9eb863a commit e083952

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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.

google.erb

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
<li<%= sidebar_current("docs-google-datasource-compute-image") %>>
2929
<a href="/docs/providers/google/d/datasource_compute_image.html">google_compute_image</a>
3030
</li>
31+
<li<%= sidebar_current("docs-google-datasource-compute-forwarding-rule") %>>
32+
<a href="/docs/providers/google/d/datasource_compute_forwarding_rule.html">google_compute_forwarding_rule</a>
33+
</li>
3134
<li<%= sidebar_current("docs-google-datasource-compute-global-address") %>>
3235
<a href="/docs/providers/google/d/datasource_compute_global_address.html">google_compute_global_address</a>
3336
</li>

0 commit comments

Comments
 (0)