Skip to content

Commit 053986f

Browse files
Promote Cross-Site Interconnect to GA (#15830)
1 parent 0308e49 commit 053986f

File tree

8 files changed

+45
-39
lines changed

8 files changed

+45
-39
lines changed

mmv1/products/compute/CrossSiteNetwork.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515
name: 'CrossSiteNetwork'
1616
description: |
1717
Represents a cross-site-network resource. A CrossSiteNetwork is used to establish L2 connectivity between groups of Interconnects.
18-
min_version: beta
1918
references:
2019
guides:
2120
'Create a Cross-Site Interconnect': 'https://cloud.google.com/network-connectivity/docs/interconnect/how-to/cross-site/create-network'
22-
api: 'https://cloud.google.com/compute/docs/reference/rest/beta/crossSiteNetworks'
21+
api: 'https://cloud.google.com/compute/docs/reference/rest/v1/crossSiteNetworks'
2322
docs:
2423
base_url: 'projects/{{project}}/global/crossSiteNetworks'
2524
self_link: 'projects/{{project}}/global/crossSiteNetworks/{{name}}'
@@ -41,7 +40,6 @@ examples:
4140
vars:
4241
name: 'test-cross-site-network'
4342
description: 'Example cross site network'
44-
min_version: 'beta'
4543
test_env_vars:
4644
project: 'PROJECT_NAME'
4745
parameters:

mmv1/products/compute/Interconnect.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ properties:
433433
- 'MACSEC'
434434
- name: 'wireGroups'
435435
type: Array
436-
min_version: beta
437436
description: |
438437
A list of the URLs of all CrossSiteNetwork WireGroups configured to use this Interconnect. The Interconnect cannot be deleted if this list is non-empty.
439438
output: true

mmv1/products/compute/WireGroup.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ description: |
2020
references:
2121
guides:
2222
'Create a WireGroup': 'https://cloud.google.com/network-connectivity/docs/interconnect/how-to/cross-site/modify-network#add-wire-group'
23-
api: 'https://cloud.google.com/compute/docs/reference/rest/beta/wireGroups'
24-
min_version: beta
23+
api: 'https://cloud.google.com/compute/docs/reference/rest/v1/wireGroups'
2524
docs:
2625
id_format: 'projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}}'
2726
base_url: 'projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups'
@@ -48,9 +47,17 @@ examples:
4847
name: 'test-wire-group'
4948
description: 'Example Wire Group'
5049
cross_site_network: 'test-cross-site-network'
51-
min_version: 'beta'
5250
test_env_vars:
5351
project: 'PROJECT_NAME'
52+
- name: 'compute_wire_group_basic_beta'
53+
primary_resource_id: 'example-test-wire-group-beta'
54+
vars:
55+
name: 'test-wire-group-beta'
56+
description: 'Example Wire Group Beta'
57+
cross_site_network: 'test-cross-site-network-beta'
58+
test_env_vars:
59+
project: 'PROJECT_NAME'
60+
min_version: 'beta'
5461
parameters:
5562
- name: 'crossSiteNetwork'
5663
type: ResourceRef
@@ -62,7 +69,6 @@ parameters:
6269
imports: 'name'
6370
diff_suppress_func: 'tpgresource.CompareResourceNames'
6471
custom_expand: 'templates/terraform/custom_expand/resourceref_with_validation.go.tmpl'
65-
min_version: beta
6672
properties:
6773
- name: 'description'
6874
type: String
@@ -121,6 +127,7 @@ properties:
121127
type: NestedObject
122128
description: |
123129
Properties specific to the wire group.
130+
min_version: 'beta'
124131
properties:
125132
- name: type
126133
type: enum
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
data "google_project" "project" {
2-
provider = google-beta
32
}
43

54
resource "google_compute_cross_site_network" "{{$.PrimaryResourceId}}" {
65
name = "{{index $.Vars "name"}}"
76
description = "{{index $.Vars "description"}}"
8-
provider = google-beta
97
}
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
data "google_project" "project" {
2-
provider = google-beta
32
}
43

54
resource "google_compute_cross_site_network" "example-cross-site-network" {
65
name = "{{index $.Vars "cross_site_network"}}"
76
description = "Example cross site network"
8-
provider = google-beta
97
}
108

119
resource "google_compute_wire_group" "{{$.PrimaryResourceId}}" {
1210
name = "{{index $.Vars "name"}}"
1311
description = "{{index $.Vars "description"}}"
1412
cross_site_network = "{{index $.Vars "cross_site_network"}}"
15-
provider = google-beta
1613
depends_on = [
1714
google_compute_cross_site_network.example-cross-site-network
1815
]
@@ -21,8 +18,5 @@ resource "google_compute_wire_group" "{{$.PrimaryResourceId}}" {
2118
fault_response = "NONE"
2219
bandwidth_allocation = "ALLOCATE_PER_WIRE"
2320
}
24-
wire_group_properties {
25-
type = "WIRE"
26-
}
2721
admin_enabled = true
2822
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
data "google_project" "project" {
2+
provider = "google-beta"
3+
}
4+
5+
resource "google_compute_cross_site_network" "example-cross-site-network" {
6+
provider = "google-beta"
7+
name = "{{index $.Vars "cross_site_network"}}"
8+
description = "Example cross site network"
9+
}
10+
11+
resource "google_compute_wire_group" "{{$.PrimaryResourceId}}" {
12+
provider = "google-beta"
13+
name = "{{index $.Vars "name"}}"
14+
description = "{{index $.Vars "description"}}"
15+
cross_site_network = "{{index $.Vars "cross_site_network"}}"
16+
depends_on = [
17+
google_compute_cross_site_network.example-cross-site-network
18+
]
19+
wire_properties {
20+
bandwidth_unmetered = 10
21+
fault_response = "NONE"
22+
bandwidth_allocation = "ALLOCATE_PER_WIRE"
23+
}
24+
wire_group_properties {
25+
type = "WIRE"
26+
}
27+
admin_enabled = true
28+
}

mmv1/third_party/terraform/services/compute/resource_compute_cross_site_network_test.go.tmpl renamed to mmv1/third_party/terraform/services/compute/resource_compute_cross_site_network_test.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package compute_test
2-
{{ if ne $.TargetVersionName `ga` -}}
2+
33
import (
44
"testing"
55

@@ -19,7 +19,7 @@ func TestAccComputeCrossSiteNetwork_update(t *testing.T) {
1919

2020
acctest.VcrTest(t, resource.TestCase{
2121
PreCheck: func() { acctest.AccTestPreCheck(t) },
22-
ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t),
22+
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
2323
CheckDestroy: testAccCheckComputeCrossSiteNetworkDestroyProducer(t),
2424
Steps: []resource.TestStep{
2525
{
@@ -48,28 +48,23 @@ func TestAccComputeCrossSiteNetwork_update(t *testing.T) {
4848
func testAccComputeCrossSiteNetwork_basic(context map[string]interface{}) string {
4949
return acctest.Nprintf(`
5050
data "google_project" "project" {
51-
provider = google-beta
5251
}
5352
5453
resource "google_compute_cross_site_network" "example-cross-site-network" {
5554
name = "tf-test-test-cross-site-network%{random_suffix}"
5655
description = "Example cross site network%{random_suffix}"
57-
provider = google-beta
5856
}
5957
`, context)
6058
}
6159

6260
func testAccComputeCrossSiteNetwork_update(context map[string]interface{}) string {
6361
return acctest.Nprintf(`
6462
data "google_project" "project" {
65-
provider = google-beta
6663
}
6764
6865
resource "google_compute_cross_site_network" "example-cross-site-network" {
6966
name = "tf-test-test-cross-site-network%{random_suffix}"
7067
description = "Example cross site network updated%{random_suffix}"
71-
provider = google-beta
7268
}
7369
`, context)
7470
}
75-
{{- end }}

mmv1/third_party/terraform/services/compute/resource_compute_wire_group_test.go.tmpl renamed to mmv1/third_party/terraform/services/compute/resource_compute_wire_group_test.go

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package compute_test
2-
{{ if ne $.TargetVersionName `ga` -}}
2+
33
import (
44
"testing"
55

@@ -20,7 +20,7 @@ func TestAccComputeWireGroup_update(t *testing.T) {
2020

2121
acctest.VcrTest(t, resource.TestCase{
2222
PreCheck: func() { acctest.AccTestPreCheck(t) },
23-
ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t),
23+
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
2424
CheckDestroy: testAccCheckComputeWireGroupDestroyProducer(t),
2525
Steps: []resource.TestStep{
2626
{
@@ -56,64 +56,51 @@ func TestAccComputeWireGroup_update(t *testing.T) {
5656
func testAccComputeWireGroup_basic(context map[string]interface{}) string {
5757
return acctest.Nprintf(`
5858
data "google_project" "project" {
59-
provider = google-beta
6059
}
6160
6261
resource "google_compute_cross_site_network" "example-cross-site-network" {
6362
name = "tf-test-cross-site-network%{random_suffix}"
6463
description = "Example cross site network"
65-
provider = google-beta
6664
}
6765
6866
resource "google_compute_wire_group" "example-test-wire-group" {
6967
name = "tf-test-test-wire-group%{random_suffix}"
7068
description = "Example Wire Group%{random_suffix}"
7169
cross_site_network = google_compute_cross_site_network.example-cross-site-network.name
72-
provider = google-beta
7370
depends_on = [
7471
google_compute_cross_site_network.example-cross-site-network
7572
]
7673
wire_properties {
7774
bandwidth_unmetered = 1000
7875
bandwidth_allocation = "ALLOCATE_PER_WIRE"
7976
}
80-
wire_group_properties {
81-
type = "REDUNDANT"
82-
}
8377
admin_enabled = true
8478
}
8579
`, context)
8680
}
8781

8882
func testAccComputeWireGroup_update(context map[string]interface{}) string {
8983
return acctest.Nprintf(`
90-
data "google_project" "project" {
91-
provider = google-beta
84+
data "google_project" "project" {
9285
}
9386
9487
resource "google_compute_cross_site_network" "example-cross-site-network" {
9588
name = "tf-test-cross-site-network%{random_suffix}"
9689
description = "Example cross site network"
97-
provider = google-beta
9890
}
9991
10092
resource "google_compute_wire_group" "example-test-wire-group" {
10193
name = "tf-test-test-wire-group%{random_suffix}"
10294
description = "Example Wire Group Updated%{random_suffix}"
10395
cross_site_network = google_compute_cross_site_network.example-cross-site-network.name
104-
provider = google-beta
10596
depends_on = [
10697
google_compute_cross_site_network.example-cross-site-network
10798
]
10899
wire_properties {
109100
bandwidth_unmetered = 1000
110101
bandwidth_allocation = "ALLOCATE_PER_WIRE"
111102
}
112-
wire_group_properties {
113-
type = "REDUNDANT"
114-
}
115103
admin_enabled = true
116104
}
117105
`, context)
118106
}
119-
{{- end }}

0 commit comments

Comments
 (0)