Skip to content

Commit 246cecd

Browse files
authored
fixes to the feature branch to get it building (#14732)
2 parents 7286340 + 8013ffe commit 246cecd

File tree

15 files changed

+44
-2987
lines changed

15 files changed

+44
-2987
lines changed

mmv1/products/datafusion/Instance.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
---
1515
name: 'Instance'
16-
plugin_framework: true
16+
# plugin_framework: true
1717
description: |
1818
Represents a Data Fusion instance.
1919
references:

mmv1/templates/terraform/pre_update/datafusion_instance_update.go.tmpl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,22 @@
1212
*/ -}}
1313
updateMask := []string{}
1414

15-
if !plan.EnableStackdriverLogging.Equal(state.EnableStackdriverLogging) {
15+
if d.HasChange("enable_stackdriver_logging") {
1616
updateMask = append(updateMask, "enableStackdriverLogging")
1717
}
1818

19-
if !plan.EnableStackdriverMonitoring.Equal(state.EnableStackdriverMonitoring) {
19+
if d.HasChange("enable_stackdriver_monitoring") {
2020
updateMask = append(updateMask, "enableStackdriverMonitoring")
2121
}
2222

23-
if !plan.EnableRbac.Equal(state.EnableRbac) {
24-
updateMask = append(updateMask, "enableRbac")
23+
if d.HasChange("enable_rbac") {
24+
updateMask = append(updateMask, "enableRbac")
2525
}
2626

27-
2827
// updateMask is a URL parameter but not present in the schema, so ReplaceVars
2928
// won't set it
3029

31-
url, err := transport_tpg.AddQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")})
30+
url, err = transport_tpg.AddQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")})
3231
if err != nil {
33-
resp.Diagnostics.AddError("Error, failure building update mask query parameters in {{ $.Name -}}", err.Error())
34-
return
32+
return err
3533
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{{/*
2+
The license inside this block applies to this file
3+
Copyright 2024 Google Inc.
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.
12+
*/ -}}
13+
updateMask := []string{}
14+
15+
if !plan.EnableStackdriverLogging.Equal(state.EnableStackdriverLogging) {
16+
updateMask = append(updateMask, "enableStackdriverLogging")
17+
}
18+
19+
if !plan.EnableStackdriverMonitoring.Equal(state.EnableStackdriverMonitoring) {
20+
updateMask = append(updateMask, "enableStackdriverMonitoring")
21+
}
22+
23+
if !plan.EnableRbac.Equal(state.EnableRbac) {
24+
updateMask = append(updateMask, "enableRbac")
25+
}
26+
27+
28+
// updateMask is a URL parameter but not present in the schema, so ReplaceVars
29+
// won't set it
30+
31+
url, err := transport_tpg.AddQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")})
32+
if err != nil {
33+
resp.Diagnostics.AddError("Error, failure building update mask query parameters in {{ $.Name -}}", err.Error())
34+
return
35+
}

mmv1/third_party/terraform/services/container/node_config.go.tmpl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,12 +1294,6 @@ func expandNodeConfig(v interface{}) *container.NodeConfig {
12941294
nc.FlexStart = v.(bool)
12951295
}
12961296

1297-
{{ if ne $.TargetVersionName `ga` -}}
1298-
if v,ok := nodeConfig["flex_start"]; ok {
1299-
nc.FlexStart = v.(bool)
1300-
}
1301-
{{- end }}
1302-
13031297
{{ if ne $.TargetVersionName `ga` -}}
13041298
if v, ok := nodeConfig["host_maintenance_policy"]; ok {
13051299
nc.HostMaintenancePolicy = expandHostMaintenancePolicy(v)

mmv1/third_party/terraform/services/dataflow/resource_dataflow_flex_template_job_test.go.tmpl

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -407,40 +407,6 @@ func TestAccDataflowFlexTemplateJob_withAdditionalPipelineOptions(t *testing.T)
407407
})
408408
}
409409

410-
func TestAccDataflowFlexTemplateJob_withAdditionalPipelineOptions(t *testing.T) {
411-
// Dataflow responses include serialized java classes and bash commands
412-
// This makes body comparison infeasible
413-
acctest.SkipIfVcr(t)
414-
t.Parallel()
415-
416-
randStr := acctest.RandString(t, 10)
417-
job := "tf-test-dataflow-job-" + randStr
418-
additionalPipelineOptions := []string{"numberOfWorkerHarnessThreads=200"}
419-
bucket := "tf-test-dataflow-bucket-" + randStr
420-
topic := "tf-test-topic" + randStr
421-
422-
acctest.VcrTest(t, resource.TestCase{
423-
PreCheck: func() { acctest.AccTestPreCheck(t) },
424-
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
425-
CheckDestroy: testAccCheckDataflowJobDestroyProducer(t),
426-
Steps: []resource.TestStep{
427-
{
428-
Config: testAccDataflowFlexTemplateJob_additionalPipelineOptions(job, bucket, topic, additionalPipelineOptions),
429-
Check: resource.ComposeTestCheckFunc(
430-
testAccDataflowFlexJobExists(t, "google_dataflow_flex_template_job.flex_job_pipeline_options", false),
431-
testAccDataflowFlexTemplateJobHasAdditionalPipelineOptions(t, "google_dataflow_flex_template_job.flex_job_pipeline_options", additionalPipelineOptions, false),
432-
),
433-
},
434-
{
435-
ResourceName: "google_dataflow_flex_template_job.flex_job_pipeline_options",
436-
ImportState: true,
437-
ImportStateVerify: true,
438-
ImportStateVerifyIgnore: []string{"on_delete", "parameters", "skip_wait_on_job_termination", "state", "additional_pipeline_options", "container_spec_gcs_path", "labels", "terraform_labels"},
439-
},
440-
},
441-
})
442-
}
443-
444410
func TestAccDataflowFlexTemplateJob_withProviderDefaultLabels(t *testing.T) {
445411
// This resource uses custom retry logic that cannot be sped up without
446412
// modifying the actual resource
@@ -2191,4 +2157,4 @@ resource "google_dataflow_flex_template_job" "flex_job" {
21912157
`, context)
21922158
}
21932159

2194-
{{- end }}
2160+
{{- end }}

mmv1/third_party/terraform/services/dns/resource_dns_managed_zone_test.go.tmpl

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -721,66 +721,6 @@ resource "google_compute_network" "network-1" {
721721
}
722722

723723
{{ if not (or (eq $.TargetVersionName ``) (eq $.TargetVersionName `ga`)) }}
724-
func TestAccDNSManagedZone_privateForwardingWithDomainNameUpdate(t *testing.T) {
725-
t.Parallel()
726-
727-
zoneSuffix := acctest.RandString(t, 10)
728-
729-
acctest.VcrTest(t, resource.TestCase{
730-
PreCheck: func() { acctest.AccTestPreCheck(t) },
731-
ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t),
732-
CheckDestroy: testAccCheckDNSManagedZoneDestroyProducer(t),
733-
Steps: []resource.TestStep{
734-
{
735-
Config: testAccDnsManagedZone_privateForwardingWithDomainNameUpdate(zoneSuffix, "dns.infra.foo.com.", "private"),
736-
},
737-
{
738-
ResourceName: "google_dns_managed_zone.private",
739-
ImportState: true,
740-
ImportStateVerify: true,
741-
},
742-
{
743-
Config: testAccDnsManagedZone_privateForwardingWithDomainNameUpdate(zoneSuffix, "dns.infra.goo.com.", "default"),
744-
},
745-
{
746-
ResourceName: "google_dns_managed_zone.private",
747-
ImportState: true,
748-
ImportStateVerify: true,
749-
},
750-
},
751-
})
752-
}
753-
754-
func testAccDnsManagedZone_privateForwardingWithDomainNameUpdate(suffix, domain_name, forwarding_path string) string {
755-
return fmt.Sprintf(`
756-
resource "google_dns_managed_zone" "private" {
757-
provider = google-beta
758-
name = "private-zone-%s"
759-
dns_name = "private.example.com."
760-
description = "Example private DNS zone"
761-
visibility = "private"
762-
private_visibility_config {
763-
networks {
764-
network_url = google_compute_network.network-1.self_link
765-
}
766-
}
767-
768-
forwarding_config {
769-
target_name_servers {
770-
domain_name = "%s"
771-
forwarding_path = "%s"
772-
}
773-
}
774-
}
775-
776-
resource "google_compute_network" "network-1" {
777-
provider = google-beta
778-
name = "tf-test-net-1-%s"
779-
auto_create_subnetworks = false
780-
}
781-
`, suffix, domain_name, forwarding_path, suffix)
782-
}
783-
784724
func TestAccDNSManagedZone_dnsManagedZoneUpdateWithServiceDirectory(t *testing.T) {
785725
t.Parallel()
786726

@@ -888,4 +828,4 @@ resource "google_compute_network" "network" {
888828
}
889829
`, context)
890830
}
891-
{{- end }}
831+
{{- end }}

mmv1/third_party/terraform/website/docs/r/container_cluster.html.markdown

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,17 +1269,6 @@ notification_config {
12691269
* `control_plane_disk_encryption_key` - (Optional) The Cloud KMS cryptoKey to use for Confidential Hyperdisk on the control plane nodes.
12701270
* `gkeops_etcd_backup_encryption_key` - (Optional) Resource path of the Cloud KMS cryptoKey to use for encryption of internal etcd backups.
12711271

1272-
<a name="nested_user_managed_keys_config"></a>The `user_managed_keys_config` block supports:
1273-
1274-
* `cluster_ca` - (Optional) The Certificate Authority Service caPool to use for the cluster CA in this cluster.
1275-
* `etcd_api_ca` - (Optional) The Certificate Authority Service caPool to use for the etcd API CA in this cluster.
1276-
* `etcd_peer_ca` - (Optional) The Certificate Authority Service caPool to use for the etcd peer CA in this cluster.
1277-
* `aggregation_ca` - (Optional) The Certificate Authority Service caPool to use for the aggreation CA in this cluster.
1278-
* `service_account_signing_keys` - (Optional) The Cloud KMS cryptoKeyVersions to use for signing service account JWTs issued by this cluster.
1279-
* `service_account_verification_keys` - (Optional) The Cloud KMS cryptoKeyVersions to use for verifying service account JWTs issued by this cluster.
1280-
* `control_plane_disk_encryption_key` - (Optional) The Cloud KMS cryptoKey to use for Confidential Hyperdisk on the control plane nodes.
1281-
* `gkeops_etcd_backup_encryption_key` - (Optional) Resource path of the Cloud KMS cryptoKey to use for encryption of internal etcd backups.
1282-
12831272
<a name="nested_control_plane_endpoints_config"></a>The `control_plane_endpoints_config` block supports:
12841273

12851274
* `dns_endpoint_config` - (Optional) DNS endpoint configuration.

0 commit comments

Comments
 (0)