From 01323da32000ea4a7eb8468350e36cb877654ee2 Mon Sep 17 00:00:00 2001 From: Jacek Witkowski <1372342+nme01@users.noreply.github.com> Date: Thu, 12 Dec 2024 08:37:48 +0100 Subject: [PATCH 1/7] Fix test for the terraform --- .../resource_compute_region_network_endpoint_test.go.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmv1/third_party/terraform/services/compute/resource_compute_region_network_endpoint_test.go.tmpl b/mmv1/third_party/terraform/services/compute/resource_compute_region_network_endpoint_test.go.tmpl index 9e0f4988ec75..671558f0956e 100644 --- a/mmv1/third_party/terraform/services/compute/resource_compute_region_network_endpoint_test.go.tmpl +++ b/mmv1/third_party/terraform/services/compute/resource_compute_region_network_endpoint_test.go.tmpl @@ -161,7 +161,7 @@ func TestAccComputeRegionNetworkEndpoint_regionNetworkEndpointPortmapExample(t * acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, - ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), Steps: []resource.TestStep{ { Config: testAccComputeRegionNetworkEndpoint_regionNetworkEndpointPortmapExample(context), From e2bf8abc3f494e0ebc532609175b287b41a29cd2 Mon Sep 17 00:00:00 2001 From: Jacek Witkowski <1372342+nme01@users.noreply.github.com> Date: Thu, 12 Dec 2024 08:40:15 +0100 Subject: [PATCH 2/7] Update RegionNetworkEndpoint.yaml --- mmv1/products/compute/RegionNetworkEndpoint.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/mmv1/products/compute/RegionNetworkEndpoint.yaml b/mmv1/products/compute/RegionNetworkEndpoint.yaml index 090b95ebcb53..2d0370f5adb2 100644 --- a/mmv1/products/compute/RegionNetworkEndpoint.yaml +++ b/mmv1/products/compute/RegionNetworkEndpoint.yaml @@ -74,7 +74,6 @@ examples: network_name: 'network' - name: 'region_network_endpoint_portmap' primary_resource_id: 'region_network_endpoint_portmap' - min_version: 'beta' vars: network_name: 'network' subnetwork_name: 'subnetwork' @@ -140,7 +139,6 @@ properties: type: Integer description: | Client destination port for the `GCE_VM_IP_PORTMAP` NEG. - min_version: 'beta' custom_flatten: 'templates/terraform/custom_flatten/float64_to_int.go.tmpl' - name: 'instance' type: ResourceRef @@ -149,4 +147,3 @@ properties: This is required for network endpoints of type GCE_VM_IP_PORTMAP. resource: 'Instance' imports: 'name' - min_version: 'beta' From 7d72b55874cb89a25e2dad51317db89baa6fc6c2 Mon Sep 17 00:00:00 2001 From: Jacek Witkowski <1372342+nme01@users.noreply.github.com> Date: Thu, 12 Dec 2024 08:41:39 +0100 Subject: [PATCH 3/7] Update RegionNetworkEndpointGroup.yaml --- mmv1/products/compute/RegionNetworkEndpointGroup.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/mmv1/products/compute/RegionNetworkEndpointGroup.yaml b/mmv1/products/compute/RegionNetworkEndpointGroup.yaml index e7d36c985ff9..f5ba65f721db 100644 --- a/mmv1/products/compute/RegionNetworkEndpointGroup.yaml +++ b/mmv1/products/compute/RegionNetworkEndpointGroup.yaml @@ -93,7 +93,6 @@ examples: network_name: 'network' - name: 'region_network_endpoint_group_portmap' primary_resource_id: 'region_network_endpoint_group_portmap' - min_version: 'beta' vars: network_name: 'network' subnetwork_name: 'subnetwork' From 9dae959900d7a1134d838541e21a3468f2ae1d08 Mon Sep 17 00:00:00 2001 From: Jacek Witkowski <1372342+nme01@users.noreply.github.com> Date: Thu, 12 Dec 2024 08:43:11 +0100 Subject: [PATCH 4/7] Update region_network_endpoint_group_portmap.tf.tmpl --- .../examples/region_network_endpoint_group_portmap.tf.tmpl | 3 --- 1 file changed, 3 deletions(-) diff --git a/mmv1/templates/terraform/examples/region_network_endpoint_group_portmap.tf.tmpl b/mmv1/templates/terraform/examples/region_network_endpoint_group_portmap.tf.tmpl index 6f41019f3c82..e311c3b11aaf 100644 --- a/mmv1/templates/terraform/examples/region_network_endpoint_group_portmap.tf.tmpl +++ b/mmv1/templates/terraform/examples/region_network_endpoint_group_portmap.tf.tmpl @@ -5,12 +5,10 @@ resource "google_compute_region_network_endpoint_group" "{{$.PrimaryResourceId}} subnetwork = google_compute_subnetwork.default.id network_endpoint_type = "GCE_VM_IP_PORTMAP" - provider = google-beta } resource "google_compute_network" "default" { name = "{{index $.Vars "network_name"}}" - provider = google-beta } resource "google_compute_subnetwork" "default" { @@ -18,5 +16,4 @@ resource "google_compute_subnetwork" "default" { ip_cidr_range = "10.0.0.0/16" region = "us-central1" network = google_compute_network.default.id - provider = google-beta } From 5a15cefbbb4051fbcef319d36667acc9b15b80b9 Mon Sep 17 00:00:00 2001 From: Jacek Witkowski <1372342+nme01@users.noreply.github.com> Date: Thu, 12 Dec 2024 08:44:33 +0100 Subject: [PATCH 5/7] Update region_network_endpoint_portmap.tf.tmpl --- .../examples/region_network_endpoint_portmap.tf.tmpl | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mmv1/templates/terraform/examples/region_network_endpoint_portmap.tf.tmpl b/mmv1/templates/terraform/examples/region_network_endpoint_portmap.tf.tmpl index bc9b61702ddc..b9352831f5ee 100644 --- a/mmv1/templates/terraform/examples/region_network_endpoint_portmap.tf.tmpl +++ b/mmv1/templates/terraform/examples/region_network_endpoint_portmap.tf.tmpl @@ -1,7 +1,6 @@ resource "google_compute_network" "default" { name = "{{index $.Vars "network_name"}}" auto_create_subnetworks = false - provider = google-beta } resource "google_compute_subnetwork" "default" { @@ -9,7 +8,6 @@ resource "google_compute_subnetwork" "default" { ip_cidr_range = "10.0.0.0/16" region = "us-central1" network = google_compute_network.default.id - provider = google-beta } resource "google_compute_region_network_endpoint_group" default { @@ -19,7 +17,6 @@ resource "google_compute_region_network_endpoint_group" default { subnetwork = google_compute_subnetwork.default.id network_endpoint_type = "GCE_VM_IP_PORTMAP" - provider = google-beta } resource "google_compute_region_network_endpoint" "{{$.PrimaryResourceId}}" { @@ -29,13 +26,11 @@ resource "google_compute_region_network_endpoint" "{{$.PrimaryResourceId}}" { port = 80 ip_address = google_compute_instance.default.network_interface[0].network_ip client_destination_port = 8080 - provider = google-beta } data "google_compute_image" "my_image" { family = "debian-11" project = "debian-cloud" - provider = google-beta } resource "google_compute_instance" "default" { @@ -54,5 +49,4 @@ resource "google_compute_instance" "default" { access_config { } } - provider = google-beta } From 18490889986975aa433c780b73f99f058d0ba123 Mon Sep 17 00:00:00 2001 From: Jacek Witkowski <1372342+nme01@users.noreply.github.com> Date: Thu, 12 Dec 2024 08:45:45 +0100 Subject: [PATCH 6/7] Update compute_region_network_endpoint.go.tmpl --- .../pre_delete/compute_region_network_endpoint.go.tmpl | 2 -- 1 file changed, 2 deletions(-) diff --git a/mmv1/templates/terraform/pre_delete/compute_region_network_endpoint.go.tmpl b/mmv1/templates/terraform/pre_delete/compute_region_network_endpoint.go.tmpl index 3d0169cd742b..bb7d1145a1bd 100644 --- a/mmv1/templates/terraform/pre_delete/compute_region_network_endpoint.go.tmpl +++ b/mmv1/templates/terraform/pre_delete/compute_region_network_endpoint.go.tmpl @@ -27,7 +27,6 @@ if fqdnProp != "" { toDelete["fqdn"] = fqdnProp } -{{- if ne $.TargetVersionName "ga" }} // Instance instanceProp, err := expandNestedComputeRegionNetworkEndpointInstance(d.Get("instance"), d, config) if err != nil { @@ -45,7 +44,6 @@ if err != nil { if clientDestinationPortProp != "" && d.Get("client_destination_port").(int) > 0 { toDelete["clientDestinationPort"] = clientDestinationPortProp } -{{- end }} obj = map[string]interface{}{ "networkEndpoints": []map[string]interface{}{toDelete}, From 37a0d2be900ef498ad493529c125e68c6a6ac194 Mon Sep 17 00:00:00 2001 From: Jacek Witkowski <1372342+nme01@users.noreply.github.com> Date: Thu, 12 Dec 2024 08:47:24 +0100 Subject: [PATCH 7/7] Update resource_compute_region_network_endpoint_test.go.tmpl --- .../resource_compute_region_network_endpoint_test.go.tmpl | 3 --- 1 file changed, 3 deletions(-) diff --git a/mmv1/third_party/terraform/services/compute/resource_compute_region_network_endpoint_test.go.tmpl b/mmv1/third_party/terraform/services/compute/resource_compute_region_network_endpoint_test.go.tmpl index 671558f0956e..e9e1bb7ed525 100644 --- a/mmv1/third_party/terraform/services/compute/resource_compute_region_network_endpoint_test.go.tmpl +++ b/mmv1/third_party/terraform/services/compute/resource_compute_region_network_endpoint_test.go.tmpl @@ -147,8 +147,6 @@ resource "google_compute_region_network_endpoint" "add2" { `, context) + testAccComputeRegionNetworkEndpoint_noRegionNetworkEndpoints(context) } -{{- if ne $.TargetVersionName "ga" }} - func TestAccComputeRegionNetworkEndpoint_regionNetworkEndpointPortmapExample(t *testing.T) { t.Parallel() @@ -249,7 +247,6 @@ resource "google_compute_region_network_endpoint" "region_network_endpoint_portm } `, context) + testAccComputeRegionNetworkEndpoint_regionNetworkEndpointPortmapNoEndpointExample(context) } -{{- end }} func testAccComputeRegionNetworkEndpoint_noRegionNetworkEndpoints(context map[string]interface{}) string { return acctest.Nprintf(`