Skip to content

Commit ebab195

Browse files
Add WireGroup Resource (#14271) (#23408)
[upstream:9f842e4cdb98c698dd9a0f952b2a0e34fb61089d] Signed-off-by: Modular Magician <[email protected]>
1 parent 2bb6469 commit ebab195

File tree

3 files changed

+281
-0
lines changed

3 files changed

+281
-0
lines changed

.changelog/14271.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
unknown: Add WireGroup Resource
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright (c) HashiCorp, Inc.
2+
// SPDX-License-Identifier: MPL-2.0
3+
// ----------------------------------------------------------------------------
4+
//
5+
// *** AUTO GENERATED CODE *** Type: Handwritten ***
6+
//
7+
// ----------------------------------------------------------------------------
8+
//
9+
// This code is generated by Magic Modules using the following:
10+
//
11+
// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/compute/resource_compute_wire_group_test.go.tmpl
12+
//
13+
// DO NOT EDIT this file directly. Any changes made to this file will be
14+
// overwritten during the next generation cycle.
15+
//
16+
// ----------------------------------------------------------------------------
17+
package compute_test
Lines changed: 263 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,263 @@
1+
---
2+
# ----------------------------------------------------------------------------
3+
#
4+
# *** AUTO GENERATED CODE *** Type: MMv1 ***
5+
#
6+
# ----------------------------------------------------------------------------
7+
#
8+
# This code is generated by Magic Modules using the following:
9+
#
10+
# Configuration: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/compute/WireGroup.yaml
11+
# Template: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.html.markdown.tmpl
12+
#
13+
# DO NOT EDIT this file directly. Any changes made to this file will be
14+
# overwritten during the next generation cycle.
15+
#
16+
# ----------------------------------------------------------------------------
17+
subcategory: "Compute Engine"
18+
description: |-
19+
The WireGroup resource represents a group of redundant wires between interconnects in two different metros.
20+
---
21+
22+
# google_compute_wire_group
23+
24+
The WireGroup resource represents a group of redundant wires between interconnects in two different metros. Each WireGroup belongs to a CrossSiteNetwork. A wire group defines endpoints and the wires which exist between them.
25+
26+
~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
27+
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources.
28+
29+
To get more information about WireGroup, see:
30+
31+
* [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/wireGroups)
32+
* How-to Guides
33+
* [Create a WireGroup](https://cloud.google.com/network-connectivity/docs/interconnect/how-to/cross-site/modify-network#add-wire-group)
34+
35+
## Example Usage - Compute Wire Group Basic
36+
37+
38+
```hcl
39+
data "google_project" "project" {
40+
provider = google-beta
41+
}
42+
43+
resource "google_compute_cross_site_network" "example-cross-site-network" {
44+
name = "test-cross-site-network"
45+
description = "Example cross site network"
46+
provider = google-beta
47+
}
48+
49+
resource "google_compute_wire_group" "example-test-wire-group" {
50+
name = "test-wire-group"
51+
description = "Example Wire Group"
52+
cross_site_network = "test-cross-site-network"
53+
provider = google-beta
54+
depends_on = [
55+
google_compute_cross_site_network.example-cross-site-network
56+
]
57+
wire_properties {
58+
bandwidth_unmetered = 10
59+
fault_response = "NONE"
60+
}
61+
wire_group_properties {
62+
type = "WIRE"
63+
}
64+
admin_enabled = true
65+
}
66+
```
67+
68+
## Argument Reference
69+
70+
The following arguments are supported:
71+
72+
73+
* `name` -
74+
(Required)
75+
Name of the resource. Provided by the client when the resource is created. The name must be
76+
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
77+
long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
78+
character must be a lowercase letter, and all following characters must be a dash,
79+
lowercase letter, or digit, except the last character, which cannot be a dash.
80+
81+
* `cross_site_network` -
82+
(Required)
83+
Required cross site network to which wire group belongs.
84+
85+
86+
- - -
87+
88+
89+
* `description` -
90+
(Optional)
91+
An optional description of this resource. Provide this property when you create the resource.
92+
93+
* `endpoints` -
94+
(Optional)
95+
Endpoints grouped by location, each mapping to interconnect configurations.
96+
Structure is [documented below](#nested_endpoints).
97+
98+
* `admin_enabled` -
99+
(Optional)
100+
Indicates whether the wire group is administratively enabled.
101+
102+
* `wire_group_properties` -
103+
(Optional)
104+
Properties specific to the wire group.
105+
Structure is [documented below](#nested_wire_group_properties).
106+
107+
* `wire_properties` -
108+
(Optional)
109+
Default properties for wires within the group.
110+
Structure is [documented below](#nested_wire_properties).
111+
112+
* `project` - (Optional) The ID of the project in which the resource belongs.
113+
If it is not provided, the provider project is used.
114+
115+
116+
<a name="nested_endpoints"></a>The `endpoints` block supports:
117+
118+
* `endpoint` - (Required) The identifier for this object. Format specified above.
119+
120+
* `interconnects` -
121+
(Optional)
122+
Structure is [documented below](#nested_endpoints_endpoints_interconnects).
123+
124+
125+
<a name="nested_endpoints_endpoints_interconnects"></a>The `interconnects` block supports:
126+
127+
* `interconnect_name` - (Required) The identifier for this object. Format specified above.
128+
129+
* `interconnect` -
130+
(Optional)
131+
132+
* `vlan_tags` -
133+
(Optional)
134+
VLAN tags for the interconnect.
135+
136+
<a name="nested_wire_group_properties"></a>The `wire_group_properties` block supports:
137+
138+
* `type` -
139+
(Optional)
140+
Type of wire group (enum).
141+
WIRE: a single pseudowire over two Interconnect connections with no redundancy.
142+
REDUNDANT: two pseudowires over four Interconnect connections, with two connections in one metro and two connections in another metro.
143+
BOX_AND_CROSS: four pseudowires over four Interconnect connections, with two connections in one metro and two connections in another metro.
144+
145+
<a name="nested_wire_properties"></a>The `wire_properties` block supports:
146+
147+
* `bandwidth_unmetered` -
148+
(Optional)
149+
The unmetered bandwidth setting.
150+
151+
* `fault_response` -
152+
(Optional)
153+
Response when a fault is detected in a pseudowire:
154+
NONE: default.
155+
DISABLE_PORT: set the port line protocol down when inline probes detect a fault. This setting is only permitted on port mode pseudowires.
156+
157+
## Attributes Reference
158+
159+
In addition to the arguments listed above, the following computed attributes are exported:
160+
161+
* `id` - an identifier for the resource with format `projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}}`
162+
163+
* `creation_timestamp` -
164+
Creation timestamp in RFC3339 text format.
165+
166+
* `wires` -
167+
The single/redundant wire(s) managed by the wire group.
168+
Structure is [documented below](#nested_wires).
169+
170+
* `topology` -
171+
Topology details for the wire group configuration.
172+
Structure is [documented below](#nested_topology).
173+
174+
175+
<a name="nested_wires"></a>The `wires` block contains:
176+
177+
* `label` -
178+
(Output)
179+
180+
* `endpoints` -
181+
(Output)
182+
'Wire endpoints are specific Interconnect connections.'
183+
Structure is [documented below](#nested_wires_wires_endpoints).
184+
185+
* `wire_properties` -
186+
(Output)
187+
A nested object resource.
188+
Structure is [documented below](#nested_wires_wires_wire_properties).
189+
190+
* `admin_enabled` -
191+
(Output)
192+
193+
194+
<a name="nested_wires_wires_endpoints"></a>The `endpoints` block contains:
195+
196+
* `interconnect` -
197+
(Output)
198+
199+
* `vlan_tag` -
200+
(Output)
201+
202+
<a name="nested_wires_wires_wire_properties"></a>The `wire_properties` block contains:
203+
204+
* `bandwidth_unmetered` -
205+
(Output)
206+
207+
* `fault_response` -
208+
(Output)
209+
210+
<a name="nested_topology"></a>The `topology` block contains:
211+
212+
* `endpoints` -
213+
(Output)
214+
Structure is [documented below](#nested_topology_endpoints).
215+
216+
217+
<a name="nested_topology_endpoints"></a>The `endpoints` block contains:
218+
219+
* `label` -
220+
(Output)
221+
222+
* `city` -
223+
(Output)
224+
225+
## Timeouts
226+
227+
This resource provides the following
228+
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
229+
230+
- `create` - Default is 20 minutes.
231+
- `update` - Default is 20 minutes.
232+
- `delete` - Default is 20 minutes.
233+
234+
## Import
235+
236+
237+
WireGroup can be imported using any of these accepted formats:
238+
239+
* `projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}}`
240+
* `{{project}}/{{cross_site_network}}/{{name}}`
241+
* `{{cross_site_network}}/{{name}}`
242+
243+
244+
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import WireGroup using one of the formats above. For example:
245+
246+
```tf
247+
import {
248+
id = "projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}}"
249+
to = google_compute_wire_group.default
250+
}
251+
```
252+
253+
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), WireGroup can be imported using one of the formats above. For example:
254+
255+
```
256+
$ terraform import google_compute_wire_group.default projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}}
257+
$ terraform import google_compute_wire_group.default {{project}}/{{cross_site_network}}/{{name}}
258+
$ terraform import google_compute_wire_group.default {{cross_site_network}}/{{name}}
259+
```
260+
261+
## User Project Overrides
262+
263+
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).

0 commit comments

Comments
 (0)