@@ -111,6 +111,7 @@ func TestAccDataprocCluster_basic(t *testing.T) {
111
111
resource .TestCheckResourceAttr ("google_dataproc_cluster.basic" , "cluster_config.0.master_config.0.num_instances" , "1" ),
112
112
resource .TestCheckResourceAttrSet ("google_dataproc_cluster.basic" , "cluster_config.0.master_config.0.disk_config.0.boot_disk_size_gb" ),
113
113
resource .TestCheckResourceAttrSet ("google_dataproc_cluster.basic" , "cluster_config.0.master_config.0.disk_config.0.num_local_ssds" ),
114
+ resource .TestCheckResourceAttrSet ("google_dataproc_cluster.basic" , "cluster_config.0.master_config.0.disk_config.0.boot_disk_type" ),
114
115
resource .TestCheckResourceAttrSet ("google_dataproc_cluster.basic" , "cluster_config.0.master_config.0.machine_type" ),
115
116
resource .TestCheckResourceAttr ("google_dataproc_cluster.basic" , "cluster_config.0.master_config.0.instance_names.#" , "1" ),
116
117
@@ -119,6 +120,7 @@ func TestAccDataprocCluster_basic(t *testing.T) {
119
120
resource .TestCheckResourceAttr ("google_dataproc_cluster.basic" , "cluster_config.0.worker_config.0.num_instances" , "2" ),
120
121
resource .TestCheckResourceAttrSet ("google_dataproc_cluster.basic" , "cluster_config.0.worker_config.0.disk_config.0.boot_disk_size_gb" ),
121
122
resource .TestCheckResourceAttrSet ("google_dataproc_cluster.basic" , "cluster_config.0.worker_config.0.disk_config.0.num_local_ssds" ),
123
+ resource .TestCheckResourceAttrSet ("google_dataproc_cluster.basic" , "cluster_config.0.worker_config.0.disk_config.0.boot_disk_type" ),
122
124
resource .TestCheckResourceAttrSet ("google_dataproc_cluster.basic" , "cluster_config.0.worker_config.0.machine_type" ),
123
125
resource .TestCheckResourceAttr ("google_dataproc_cluster.basic" , "cluster_config.0.worker_config.0.instance_names.#" , "2" ),
124
126
@@ -132,7 +134,7 @@ func TestAccDataprocCluster_basic(t *testing.T) {
132
134
})
133
135
}
134
136
135
- func TestAccDataprocCluster_basicWithInternalIpOnlyTrue (t * testing.T ) {
137
+ func TestAccDataprocCluster_withInternalIpOnlyTrue (t * testing.T ) {
136
138
t .Parallel ()
137
139
138
140
var cluster dataproc.Cluster
@@ -143,7 +145,7 @@ func TestAccDataprocCluster_basicWithInternalIpOnlyTrue(t *testing.T) {
143
145
CheckDestroy : testAccCheckDataprocClusterDestroy (),
144
146
Steps : []resource.TestStep {
145
147
{
146
- Config : testAccDataprocCluster_basicWithInternalIpOnlyTrue (rnd ),
148
+ Config : testAccDataprocCluster_withInternalIpOnlyTrue (rnd ),
147
149
Check : resource .ComposeTestCheckFunc (
148
150
testAccCheckDataprocClusterExists ("google_dataproc_cluster.basic" , & cluster ),
149
151
@@ -155,7 +157,7 @@ func TestAccDataprocCluster_basicWithInternalIpOnlyTrue(t *testing.T) {
155
157
})
156
158
}
157
159
158
- func TestAccDataprocCluster_basicWithMetadata (t * testing.T ) {
160
+ func TestAccDataprocCluster_withMetadata (t * testing.T ) {
159
161
t .Parallel ()
160
162
161
163
var cluster dataproc.Cluster
@@ -166,7 +168,7 @@ func TestAccDataprocCluster_basicWithMetadata(t *testing.T) {
166
168
CheckDestroy : testAccCheckDataprocClusterDestroy (),
167
169
Steps : []resource.TestStep {
168
170
{
169
- Config : testAccDataprocCluster_basicWithMetadata (rnd ),
171
+ Config : testAccDataprocCluster_withMetadata (rnd ),
170
172
Check : resource .ComposeTestCheckFunc (
171
173
testAccCheckDataprocClusterExists ("google_dataproc_cluster.basic" , & cluster ),
172
174
@@ -534,12 +536,14 @@ func validateDataprocCluster_withConfigOverrides(n string, cluster *dataproc.Clu
534
536
{"cluster_config.0.master_config.0.num_instances" , "3" , strconv .Itoa (int (cluster .Config .MasterConfig .NumInstances ))},
535
537
{"cluster_config.0.master_config.0.disk_config.0.boot_disk_size_gb" , "10" , strconv .Itoa (int (cluster .Config .MasterConfig .DiskConfig .BootDiskSizeGb ))},
536
538
{"cluster_config.0.master_config.0.disk_config.0.num_local_ssds" , "0" , strconv .Itoa (int (cluster .Config .MasterConfig .DiskConfig .NumLocalSsds ))},
539
+ {"cluster_config.0.master_config.0.disk_config.0.boot_disk_type" , "pd-ssd" , cluster .Config .MasterConfig .DiskConfig .BootDiskType },
537
540
{"cluster_config.0.master_config.0.machine_type" , "n1-standard-1" , GetResourceNameFromSelfLink (cluster .Config .MasterConfig .MachineTypeUri )},
538
541
{"cluster_config.0.master_config.0.instance_names.#" , "3" , strconv .Itoa (len (cluster .Config .MasterConfig .InstanceNames ))},
539
542
540
543
{"cluster_config.0.worker_config.0.num_instances" , "3" , strconv .Itoa (int (cluster .Config .WorkerConfig .NumInstances ))},
541
544
{"cluster_config.0.worker_config.0.disk_config.0.boot_disk_size_gb" , "11" , strconv .Itoa (int (cluster .Config .WorkerConfig .DiskConfig .BootDiskSizeGb ))},
542
545
{"cluster_config.0.worker_config.0.disk_config.0.num_local_ssds" , "1" , strconv .Itoa (int (cluster .Config .WorkerConfig .DiskConfig .NumLocalSsds ))},
546
+ {"cluster_config.0.worker_config.0.disk_config.0.boot_disk_type" , "pd-standard" , cluster .Config .WorkerConfig .DiskConfig .BootDiskType },
543
547
{"cluster_config.0.worker_config.0.machine_type" , "n1-standard-1" , GetResourceNameFromSelfLink (cluster .Config .WorkerConfig .MachineTypeUri )},
544
548
{"cluster_config.0.worker_config.0.instance_names.#" , "3" , strconv .Itoa (len (cluster .Config .WorkerConfig .InstanceNames ))},
545
549
@@ -626,7 +630,7 @@ resource "google_dataproc_cluster" "basic" {
626
630
` , rnd )
627
631
}
628
632
629
- func testAccDataprocCluster_basicWithInternalIpOnlyTrue (rnd string ) string {
633
+ func testAccDataprocCluster_withInternalIpOnlyTrue (rnd string ) string {
630
634
return fmt .Sprintf (`
631
635
variable subnetwork_cidr {
632
636
default = "10.0.0.0/16"
@@ -692,7 +696,7 @@ resource "google_dataproc_cluster" "basic" {
692
696
` , rnd , rnd , rnd )
693
697
}
694
698
695
- func testAccDataprocCluster_basicWithMetadata (rnd string ) string {
699
+ func testAccDataprocCluster_withMetadata (rnd string ) string {
696
700
return fmt .Sprintf (`
697
701
resource "google_dataproc_cluster" "basic" {
698
702
name = "dproc-cluster-test-%s"
@@ -740,6 +744,7 @@ resource "google_dataproc_cluster" "with_config_overrides" {
740
744
num_instances = 3
741
745
machine_type = "n1-standard-1"
742
746
disk_config {
747
+ boot_disk_type = "pd-ssd"
743
748
boot_disk_size_gb = 10
744
749
}
745
750
}
@@ -748,6 +753,7 @@ resource "google_dataproc_cluster" "with_config_overrides" {
748
753
num_instances = 3
749
754
machine_type = "n1-standard-1"
750
755
disk_config {
756
+ boot_disk_type = "pd-standard"
751
757
boot_disk_size_gb = 11
752
758
num_local_ssds = 1
753
759
}
0 commit comments