@@ -254,6 +254,31 @@ func TestAccDataprocCluster_withInternalIpOnlyTrueAndShieldedConfig(t *testing.T
254
254
})
255
255
}
256
256
257
+ func TestAccDataprocCluster_withShieldedConfig(t *testing.T) {
258
+ t.Parallel()
259
+
260
+ var cluster dataproc.Cluster
261
+ rnd := acctest.RandString(t, 10)
262
+ acctest.VcrTest(t, resource.TestCase{
263
+ PreCheck: func() { acctest.AccTestPreCheck(t) },
264
+ ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
265
+ CheckDestroy: testAccCheckDataprocClusterDestroy(t),
266
+ Steps: []resource.TestStep{
267
+ {
268
+ Config: testAccDataprocCluster_withShieldedConfig(rnd),
269
+ Check: resource.ComposeTestCheckFunc(
270
+ testAccCheckDataprocClusterExists(t, "google_dataproc_cluster.basic", &cluster),
271
+
272
+ // Testing behavior for Dataproc to use only internal IP addresses
273
+ resource.TestCheckResourceAttr("google_dataproc_cluster.basic", "cluster_config.0.gce_cluster_config.0.shielded_instance_config.0.enable_integrity_monitoring", "false"),
274
+ resource.TestCheckResourceAttr("google_dataproc_cluster.basic", "cluster_config.0.gce_cluster_config.0.shielded_instance_config.0.enable_secure_boot", "false"),
275
+ resource.TestCheckResourceAttr("google_dataproc_cluster.basic", "cluster_config.0.gce_cluster_config.0.shielded_instance_config.0.enable_vtpm", "false"),
276
+ ),
277
+ },
278
+ },
279
+ })
280
+ }
281
+
257
282
func TestAccDataprocCluster_withConfidentialCompute(t *testing.T) {
258
283
t.Parallel()
259
284
@@ -1581,6 +1606,25 @@ resource "google_dataproc_cluster" "basic" {
1581
1606
`, rnd, rnd, rnd, rnd)
1582
1607
}
1583
1608
1609
+ func testAccDataprocCluster_withShieldedConfig(rnd string) string {
1610
+ return fmt.Sprintf(`
1611
+ resource "google_dataproc_cluster" "basic" {
1612
+ name = "tf-test-dproc-%s"
1613
+ region = "us-central1"
1614
+
1615
+ cluster_config {
1616
+ gce_cluster_config {
1617
+ shielded_instance_config {
1618
+ enable_integrity_monitoring = false
1619
+ enable_secure_boot = false
1620
+ enable_vtpm = false
1621
+ }
1622
+ }
1623
+ }
1624
+ }
1625
+ `, rnd)
1626
+ }
1627
+
1584
1628
func testAccDataprocCluster_withConfidentialCompute(rnd, subnetworkName string, imageUri string) string {
1585
1629
return fmt.Sprintf(`
1586
1630
resource "google_dataproc_cluster" "confidential" {
0 commit comments