@@ -28,7 +28,7 @@ func TestAccDataprocCluster_missingZoneGlobalRegion1(t *testing.T) {
28
28
29
29
rnd := acctest.RandString(t, 10)
30
30
acctest.VcrTest(t, resource.TestCase{
31
- PreCheck: func() { acctest.AccTestPreCheck(t) },
31
+ PreCheck: func() { acctest.AccTestPreCheck(t) },
32
32
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
33
33
Steps: []resource.TestStep{
34
34
{
@@ -44,7 +44,7 @@ func TestAccDataprocCluster_missingZoneGlobalRegion2(t *testing.T) {
44
44
45
45
rnd := acctest.RandString(t, 10)
46
46
acctest.VcrTest(t, resource.TestCase{
47
- PreCheck: func() { acctest.AccTestPreCheck(t) },
47
+ PreCheck: func() { acctest.AccTestPreCheck(t) },
48
48
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
49
49
Steps: []resource.TestStep{
50
50
{
@@ -559,7 +559,6 @@ func TestAccDataprocCluster_spotWithAuxiliaryNodeGroups(t *testing.T) {
559
559
resource.TestCheckResourceAttr("google_dataproc_cluster.with_auxiliary_node_groups", "cluster_config.0.auxiliary_node_groups.0.node_group.0.node_group_config.0.accelerators.0.accelerator_count", "1"),
560
560
resource.TestCheckResourceAttr("google_dataproc_cluster.with_auxiliary_node_groups", "cluster_config.0.auxiliary_node_groups.0.node_group_id", "node-group-id"),
561
561
testAccCheckDataprocAuxiliaryNodeGroupAccelerator(&cluster, project),
562
-
563
562
),
564
563
},
565
564
},
@@ -707,7 +706,7 @@ func TestAccDataprocCluster_withServiceAcc(t *testing.T) {
707
706
ExternalProviders: map[string]resource.ExternalProvider{
708
707
"time": {},
709
708
},
710
- CheckDestroy: testAccCheckDataprocClusterDestroy(t),
709
+ CheckDestroy: testAccCheckDataprocClusterDestroy(t),
711
710
Steps: []resource.TestStep{
712
711
{
713
712
Config: testAccDataprocCluster_withServiceAcc(sa, rnd, subnetworkName),
@@ -827,13 +826,13 @@ func TestAccDataprocCluster_withLifecycleConfigAutoDeletion(t *testing.T) {
827
826
CheckDestroy: testAccCheckDataprocClusterDestroy(t),
828
827
Steps: []resource.TestStep{
829
828
{
830
- Config: testAccDataprocCluster_withLifecycleConfigAutoDeletionTime(rnd, now.Add(time.Hour * 10).Format(fmtString), subnetworkName),
829
+ Config: testAccDataprocCluster_withLifecycleConfigAutoDeletionTime(rnd, now.Add(time.Hour* 10).Format(fmtString), subnetworkName),
831
830
Check: resource.ComposeTestCheckFunc(
832
831
testAccCheckDataprocClusterExists(t, "google_dataproc_cluster.with_lifecycle_config", &cluster),
833
832
),
834
833
},
835
834
{
836
- Config: testAccDataprocCluster_withLifecycleConfigAutoDeletionTime(rnd, now.Add(time.Hour * 20).Format(fmtString), subnetworkName),
835
+ Config: testAccDataprocCluster_withLifecycleConfigAutoDeletionTime(rnd, now.Add(time.Hour* 20).Format(fmtString), subnetworkName),
837
836
Check: resource.ComposeTestCheckFunc(
838
837
testAccCheckDataprocClusterExists(t, "google_dataproc_cluster.with_lifecycle_config", &cluster),
839
838
),
@@ -1046,7 +1045,7 @@ func TestAccDataprocCluster_withMetastoreConfig(t *testing.T) {
1046
1045
updateServiceId := "tf-test-metastore-srv-update-" + acctest.RandString(t, 10)
1047
1046
msName_basic := fmt.Sprintf("projects/%s/locations/us-central1/services/%s", pid, basicServiceId)
1048
1047
msName_update := fmt.Sprintf("projects/%s/locations/us-central1/services/%s", pid, updateServiceId)
1049
-
1048
+
1050
1049
var cluster dataproc.Cluster
1051
1050
clusterName := "tf-test-" + acctest.RandString(t, 10)
1052
1051
acctest.VcrTest(t, resource.TestCase{
@@ -1058,16 +1057,14 @@ func TestAccDataprocCluster_withMetastoreConfig(t *testing.T) {
1058
1057
Config: testAccDataprocCluster_withMetastoreConfig(clusterName, basicServiceId),
1059
1058
Check: resource.ComposeTestCheckFunc(
1060
1059
testAccCheckDataprocClusterExists(t, "google_dataproc_cluster.with_metastore_config", &cluster),
1061
- resource.TestCheckResourceAttr("google_dataproc_cluster.with_metastore_config", "cluster_config.0.metastore_config.0.dataproc_metastore_service",msName_basic),
1062
-
1060
+ resource.TestCheckResourceAttr("google_dataproc_cluster.with_metastore_config", "cluster_config.0.metastore_config.0.dataproc_metastore_service", msName_basic),
1063
1061
),
1064
1062
},
1065
1063
{
1066
1064
Config: testAccDataprocCluster_withMetastoreConfig_update(clusterName, updateServiceId),
1067
1065
Check: resource.ComposeTestCheckFunc(
1068
1066
testAccCheckDataprocClusterExists(t, "google_dataproc_cluster.with_metastore_config", &cluster),
1069
1067
resource.TestCheckResourceAttr("google_dataproc_cluster.with_metastore_config", "cluster_config.0.metastore_config.0.dataproc_metastore_service", msName_update),
1070
-
1071
1068
),
1072
1069
},
1073
1070
},
@@ -1417,6 +1414,10 @@ resource "google_dataproc_cluster" "accelerated_cluster" {
1417
1414
region = "us-central1"
1418
1415
1419
1416
cluster_config {
1417
+ software_config {
1418
+ image_version = "2.0.35-debian10"
1419
+ }
1420
+
1420
1421
gce_cluster_config {
1421
1422
subnetwork = "%s"
1422
1423
zone = "%s"
@@ -1652,6 +1653,9 @@ resource "google_dataproc_cluster" "basic" {
1652
1653
region = "us-central1"
1653
1654
1654
1655
cluster_config {
1656
+ software_config {
1657
+ image_version = "2.0.35-debian10"
1658
+ }
1655
1659
gce_cluster_config {
1656
1660
subnetwork = "%s"
1657
1661
zone = "us-central1-f"
@@ -1764,6 +1768,7 @@ resource "google_dataproc_cluster" "with_init_action" {
1764
1768
1765
1769
# Keep the costs down with smallest config we can get away with
1766
1770
software_config {
1771
+ image_version = "2.0.35-debian10"
1767
1772
override_properties = {
1768
1773
"dataproc:dataproc.allow.zero.workers" = "true"
1769
1774
}
@@ -2028,6 +2033,7 @@ resource "google_dataproc_cluster" "with_bucket" {
2028
2033
2029
2034
# Keep the costs down with smallest config we can get away with
2030
2035
software_config {
2036
+ image_version = "2.0.35-debian10"
2031
2037
override_properties = {
2032
2038
"dataproc:dataproc.allow.zero.workers" = "true"
2033
2039
}
@@ -2061,6 +2067,7 @@ resource "google_dataproc_cluster" "with_bucket" {
2061
2067
2062
2068
# Keep the costs down with smallest config we can get away with
2063
2069
software_config {
2070
+ image_version = "2.0.35-debian10"
2064
2071
override_properties = {
2065
2072
"dataproc:dataproc.allow.zero.workers" = "true"
2066
2073
}
@@ -2250,6 +2257,7 @@ resource "google_dataproc_cluster" "with_service_account" {
2250
2257
cluster_config {
2251
2258
# Keep the costs down with smallest config we can get away with
2252
2259
software_config {
2260
+ image_version = "2.0.35-debian10"
2253
2261
override_properties = {
2254
2262
"dataproc:dataproc.allow.zero.workers" = "true"
2255
2263
}
0 commit comments