Skip to content

Commit a5ea060

Browse files
authored
upgrade dcl to 1.77 (#12879)
1 parent 51dc652 commit a5ea060

File tree

5 files changed

+100
-2
lines changed

5 files changed

+100
-2
lines changed

mmv1/third_party/terraform/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.23
44

55
require (
66
cloud.google.com/go/bigtable v1.33.0
7-
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.76.0
7+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.77.0
88
github.com/apparentlymart/go-cidr v1.1.0
99
github.com/davecgh/go-spew v1.1.1
1010
github.com/dnaeon/go-vcr v1.0.1

mmv1/third_party/terraform/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
2424
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
2525
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.76.0 h1:VH/j8GmTsvPds/NkGfo4OYr9C7R8ysikaqq4rcDUT0s=
2626
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.76.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k=
27+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.77.0 h1:fCJw7h8lc8oVQAhoMABdsWAGWF8E6+4A5HvDHe5OsVM=
28+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.77.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k=
2729
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
2830
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
2931
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 h1:bkyFVUP+ROOARdgCiJzNQo2V2kiB97LyUpzH9P6Hrlg=

mmv1/third_party/terraform/services/dataproc/resource_dataproc_workflow_template_test.go.tmpl

+94
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,33 @@ func TestAccDataprocWorkflowTemplate_withShieldedVMs(t *testing.T) {
7575
})
7676
}
7777

78+
func TestAccDataprocWorkflowTemplate_encryptionConfig(t *testing.T) {
79+
t.Parallel()
80+
81+
context := map[string]interface{}{
82+
"random_suffix": acctest.RandString(t, 10),
83+
"project": envvar.GetTestProjectFromEnv(),
84+
"version": "2.0.35-debian10",
85+
"kms_key_name": acctest.BootstrapKMSKeyWithPurposeInLocationAndName(t, "ENCRYPT_DECRYPT", "us-central1", "tf-bootstrap-dataproc-workflow").CryptoKey.Name,
86+
}
87+
88+
acctest.VcrTest(t, resource.TestCase{
89+
PreCheck: func() { acctest.AccTestPreCheck(t) },
90+
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
91+
CheckDestroy: funcAccTestDataprocWorkflowTemplateCheckDestroy(t),
92+
Steps: []resource.TestStep{
93+
{
94+
Config: testAccDataprocWorkflowTemplate_encryptionConfig(context),
95+
},
96+
{
97+
ImportState: true,
98+
ImportStateVerify: true,
99+
ResourceName: "google_dataproc_workflow_template.template",
100+
},
101+
},
102+
})
103+
}
104+
78105
func testAccDataprocWorkflowTemplate_basic(context map[string]interface{}) string {
79106
return acctest.Nprintf(`
80107
resource "google_dataproc_workflow_template" "template" {
@@ -197,6 +224,73 @@ resource "google_dataproc_workflow_template" "shielded_vms_template" {
197224
`, context)
198225
}
199226

227+
func testAccDataprocWorkflowTemplate_encryptionConfig(context map[string]interface{}) string {
228+
return acctest.Nprintf(`
229+
resource "google_dataproc_workflow_template" "template" {
230+
name = "template%{random_suffix}"
231+
location = "us-central1"
232+
encryption_config {
233+
kms_key = "%{kms_key_name}"
234+
}
235+
placement {
236+
managed_cluster {
237+
cluster_name = "my-cluster"
238+
config {
239+
gce_cluster_config {
240+
zone = "us-central1-a"
241+
tags = ["foo", "bar"]
242+
}
243+
master_config {
244+
num_instances = 1
245+
machine_type = "n1-standard-1"
246+
disk_config {
247+
boot_disk_type = "pd-ssd"
248+
boot_disk_size_gb = 15
249+
}
250+
}
251+
worker_config {
252+
num_instances = 3
253+
machine_type = "n1-standard-2"
254+
disk_config {
255+
boot_disk_size_gb = 10
256+
num_local_ssds = 2
257+
}
258+
}
259+
260+
secondary_worker_config {
261+
num_instances = 2
262+
}
263+
software_config {
264+
image_version = "%{version}"
265+
}
266+
}
267+
}
268+
}
269+
jobs {
270+
step_id = "someJob"
271+
spark_job {
272+
main_class = "SomeClass"
273+
}
274+
}
275+
jobs {
276+
step_id = "otherJob"
277+
prerequisite_step_ids = ["someJob"]
278+
presto_job {
279+
query_file_uri = "someuri"
280+
}
281+
}
282+
depends_on =[google_kms_crypto_key_iam_member.crypto_key]
283+
}
284+
285+
data "google_project" "project" {}
286+
resource "google_kms_crypto_key_iam_member" "crypto_key" {
287+
crypto_key_id = "%{kms_key_name}"
288+
role = "roles/cloudkms.cryptoKeyEncrypterDecrypter"
289+
member = "serviceAccount:service-${data.google_project.project.number}@dataproc-accounts.iam.gserviceaccount.com"
290+
}
291+
`, context)
292+
}
293+
200294
func funcAccTestDataprocWorkflowTemplateCheckDestroy(t *testing.T) func(s *terraform.State) error {
201295
return func(s *terraform.State) error {
202296
for name, rs := range s.RootModule().Resources {

tpgtools/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.23
44

55
require (
66
bitbucket.org/creachadair/stringset v0.0.11
7-
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.76.0
7+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.77.0
88
github.com/golang/glog v1.1.2
99
github.com/hashicorp/hcl v1.0.0
1010
github.com/kylelemons/godebug v1.1.0

tpgtools/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2Aawl
88
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
99
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.76.0 h1:VH/j8GmTsvPds/NkGfo4OYr9C7R8ysikaqq4rcDUT0s=
1010
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.76.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k=
11+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.77.0 h1:fCJw7h8lc8oVQAhoMABdsWAGWF8E6+4A5HvDHe5OsVM=
12+
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.77.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k=
1113
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
1214
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
1315
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=

0 commit comments

Comments
 (0)