diff --git a/mmv1/third_party/terraform/services/dataproc/resource_dataproc_workflow_template.go.tmpl b/mmv1/third_party/terraform/services/dataproc/resource_dataproc_workflow_template.go.tmpl
index f7c9fe0ac038..193a86213ae6 100644
--- a/mmv1/third_party/terraform/services/dataproc/resource_dataproc_workflow_template.go.tmpl
+++ b/mmv1/third_party/terraform/services/dataproc/resource_dataproc_workflow_template.go.tmpl
@@ -1603,7 +1603,78 @@ func DataprocWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig
Computed: true,
Optional: true,
ForceNew: true,
- Description: "Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.",
+ Description: "Optional. Number of attached SSDs, from 0 to 8 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.",
+ },
+
+ "boot_disk_provisioned_iops": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. This field is supported only if boot_disk_type is hyperdisk-balanced.",
+ },
+
+ "boot_disk_provisioned_throughput": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle. Values must be greater than or equal to 1. This field is supported only if boot_disk_type is hyperdisk-balanced.",
+ },
+
+ "local_ssd_interface": {
+ Type: schema.TypeString,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Interface type of local SSDs (default is \"scsi\"). Valid values: \"scsi\" (Small Computer System Interface), \"nvme\" (Non-Volatile Memory Express).",
+ },
+
+ "attached_disk_config": {
+ Type: schema.TypeList,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Attached disk configuration.",
+ Elem: DataprocWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigSchema(),
+ },
+ },
+ }
+}
+
+func DataprocWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigSchema() *schema.Resource {
+ return &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "disk_size_gb": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Size of the attached disk, specified in GB.",
+ },
+
+ "disk_type": {
+ Type: schema.TypeString,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. The disk type of the attached disk. Currently only supports Hyperdisks: `hyperdisk-balanced`, `hyperdisk-extreme`, `hyperdisk-ml`, `hyperdisk-throughput`.",
+ },
+
+ "provisioned_iops": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle.",
+ },
+
+ "provisioned_throughput": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle.",
},
},
}
@@ -1861,7 +1932,78 @@ func DataprocWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigD
Computed: true,
Optional: true,
ForceNew: true,
- Description: "Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.",
+ Description: "Optional. Number of attached SSDs, from 0 to 8 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.",
+ },
+
+ "boot_disk_provisioned_iops": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. This field is supported only if boot_disk_type is hyperdisk-balanced.",
+ },
+
+ "boot_disk_provisioned_throughput": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle. Values must be greater than or equal to 1. This field is supported only if boot_disk_type is hyperdisk-balanced.",
+ },
+
+ "local_ssd_interface": {
+ Type: schema.TypeString,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Interface type of local SSDs (default is \"scsi\"). Valid values: \"scsi\" (Small Computer System Interface), \"nvme\" (Non-Volatile Memory Express).",
+ },
+
+ "attached_disk_config": {
+ Type: schema.TypeList,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Attached disk configuration.",
+ Elem: DataprocWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigSchema(),
+ },
+ },
+ }
+}
+
+func DataprocWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigSchema() *schema.Resource {
+ return &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "disk_size_gb": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Size of the attached disk, specified in GB.",
+ },
+
+ "disk_type": {
+ Type: schema.TypeString,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. The disk type of the attached disk. Currently only supports Hyperdisks: `hyperdisk-balanced`, `hyperdisk-extreme`, `hyperdisk-ml`, `hyperdisk-throughput`.",
+ },
+
+ "provisioned_iops": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle.",
+ },
+
+ "provisioned_throughput": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle.",
},
},
}
@@ -2298,7 +2440,78 @@ func DataprocWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfig
Computed: true,
Optional: true,
ForceNew: true,
- Description: "Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.",
+ Description: "Optional. Number of attached SSDs, from 0 to 8 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.",
+ },
+
+ "boot_disk_provisioned_iops": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. This field is supported only if boot_disk_type is hyperdisk-balanced.",
+ },
+
+ "boot_disk_provisioned_throughput": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle. Values must be greater than or equal to 1. This field is supported only if boot_disk_type is hyperdisk-balanced.",
+ },
+
+ "local_ssd_interface": {
+ Type: schema.TypeString,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Interface type of local SSDs (default is \"scsi\"). Valid values: \"scsi\" (Small Computer System Interface), \"nvme\" (Non-Volatile Memory Express).",
+ },
+
+ "attached_disk_config": {
+ Type: schema.TypeList,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Attached disk configuration.",
+ Elem: DataprocWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigSchema(),
+ },
+ },
+ }
+}
+
+func DataprocWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigSchema() *schema.Resource {
+ return &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "disk_size_gb": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Size of the attached disk, specified in GB.",
+ },
+
+ "disk_type": {
+ Type: schema.TypeString,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. The disk type of the attached disk. Currently only supports Hyperdisks: `hyperdisk-balanced`, `hyperdisk-extreme`, `hyperdisk-ml`, `hyperdisk-throughput`.",
+ },
+
+ "provisioned_iops": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle.",
+ },
+
+ "provisioned_throughput": {
+ Type: schema.TypeInt,
+ Computed: true,
+ Optional: true,
+ ForceNew: true,
+ Description: "Optional. Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle.",
},
},
}
@@ -4046,9 +4259,13 @@ func expandDataprocWorkflowTemplatePlacementManagedClusterConfigMasterConfigDisk
}
obj := objArr[0].(map[string]interface{})
return &WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig{
- BootDiskSizeGb: dcl.Int64OrNil(int64(obj["boot_disk_size_gb"].(int))),
- BootDiskType: dcl.StringOrNil(obj["boot_disk_type"].(string)),
- NumLocalSsds: dcl.Int64OrNil(int64(obj["num_local_ssds"].(int))),
+ BootDiskSizeGb: dcl.Int64OrNil(int64(obj["boot_disk_size_gb"].(int))),
+ BootDiskType: dcl.StringOrNil(obj["boot_disk_type"].(string)),
+ NumLocalSsds: dcl.Int64OrNil(int64(obj["num_local_ssds"].(int))),
+ BootDiskProvisionedIops: dcl.Int64OrNil(int64(obj["boot_disk_provisioned_iops"].(int))),
+ BootDiskProvisionedThroughput: dcl.Int64OrNil(int64(obj["boot_disk_provisioned_throughput"].(int))),
+ LocalSsdInterface: dcl.StringOrNil(obj["local_ssd_interface"].(string)),
+ AttachedDiskConfig: expandDataprocWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigArray(obj["attached_disk_config"]),
}
}
@@ -4057,15 +4274,81 @@ func flattenDataprocWorkflowTemplatePlacementManagedClusterConfigMasterConfigDis
return nil
}
transformed := map[string]interface{}{
- "boot_disk_size_gb": obj.BootDiskSizeGb,
- "boot_disk_type": obj.BootDiskType,
- "num_local_ssds": obj.NumLocalSsds,
+ "boot_disk_size_gb": obj.BootDiskSizeGb,
+ "boot_disk_type": obj.BootDiskType,
+ "num_local_ssds": obj.NumLocalSsds,
+ "boot_disk_provisioned_iops": obj.BootDiskProvisionedIops,
+ "boot_disk_provisioned_throughput": obj.BootDiskProvisionedThroughput,
+ "local_ssd_interface": obj.LocalSsdInterface,
+ "attached_disk_config": flattenDataprocWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigArray(obj.AttachedDiskConfig),
}
return []interface{}{transformed}
}
+func expandDataprocWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigArray(o interface{}) []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig {
+ if o == nil {
+ return nil
+ }
+
+ objs := o.([]interface{})
+ if len(objs) == 0 || objs[0] == nil {
+ return nil
+ }
+
+ items := make([]WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig, 0, len(objs))
+ for _, item := range objs {
+ i := expandDataprocWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(item)
+ items = append(items, *i)
+ }
+
+ return items
+}
+
+func expandDataprocWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(o interface{}) *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig {
+ if o == nil {
+ return nil
+ }
+
+ obj := o.(map[string]interface{})
+ return &WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig{
+ DiskSizeGb: dcl.Int64OrNil(int64(obj["disk_size_gb"].(int))),
+ DiskType: dcl.StringOrNil(obj["disk_type"].(string)),
+ ProvisionedIops: dcl.Int64OrNil(int64(obj["provisioned_iops"].(int))),
+ ProvisionedThroughput: dcl.Int64OrNil(int64(obj["provisioned_throughput"].(int))),
+ }
+}
+
+func flattenDataprocWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigArray(objs []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig) []interface{} {
+ if objs == nil {
+ return nil
+ }
+
+ items := []interface{}{}
+ for _, item := range objs {
+ i := flattenDataprocWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(&item)
+ items = append(items, i)
+ }
+
+ return items
+}
+
+func flattenDataprocWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(obj *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig) interface{} {
+ if obj == nil || obj.Empty() {
+ return nil
+ }
+ transformed := map[string]interface{}{
+ "disk_size_gb": obj.DiskSizeGb,
+ "disk_type": obj.DiskType,
+ "provisioned_iops": obj.ProvisionedIops,
+ "provisioned_throughput": obj.ProvisionedThroughput,
+ }
+
+ return transformed
+
+}
+
func expandDataprocWorkflowTemplatePlacementManagedClusterConfigMasterConfigInstanceFlexibilityPolicy(o interface{}) *WorkflowTemplatePlacementManagedClusterConfigMasterConfigInstanceFlexibilityPolicy {
if o == nil {
return nil
@@ -4348,9 +4631,13 @@ func expandDataprocWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerC
}
obj := objArr[0].(map[string]interface{})
return &WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfig{
- BootDiskSizeGb: dcl.Int64OrNil(int64(obj["boot_disk_size_gb"].(int))),
- BootDiskType: dcl.StringOrNil(obj["boot_disk_type"].(string)),
- NumLocalSsds: dcl.Int64OrNil(int64(obj["num_local_ssds"].(int))),
+ BootDiskSizeGb: dcl.Int64OrNil(int64(obj["boot_disk_size_gb"].(int))),
+ BootDiskType: dcl.StringOrNil(obj["boot_disk_type"].(string)),
+ NumLocalSsds: dcl.Int64OrNil(int64(obj["num_local_ssds"].(int))),
+ BootDiskProvisionedIops: dcl.Int64OrNil(int64(obj["boot_disk_provisioned_iops"].(int))),
+ BootDiskProvisionedThroughput: dcl.Int64OrNil(int64(obj["boot_disk_provisioned_throughput"].(int))),
+ LocalSsdInterface: dcl.StringOrNil(obj["local_ssd_interface"].(string)),
+ AttachedDiskConfig: expandDataprocWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigArray(obj["attached_disk_config"]),
}
}
@@ -4359,15 +4646,81 @@ func flattenDataprocWorkflowTemplatePlacementManagedClusterConfigSecondaryWorker
return nil
}
transformed := map[string]interface{}{
- "boot_disk_size_gb": obj.BootDiskSizeGb,
- "boot_disk_type": obj.BootDiskType,
- "num_local_ssds": obj.NumLocalSsds,
+ "boot_disk_size_gb": obj.BootDiskSizeGb,
+ "boot_disk_type": obj.BootDiskType,
+ "num_local_ssds": obj.NumLocalSsds,
+ "boot_disk_provisioned_iops": obj.BootDiskProvisionedIops,
+ "boot_disk_provisioned_throughput": obj.BootDiskProvisionedThroughput,
+ "local_ssd_interface": obj.LocalSsdInterface,
+ "attached_disk_config": flattenDataprocWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigArray(obj.AttachedDiskConfig),
}
return []interface{}{transformed}
}
+func expandDataprocWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigArray(o interface{}) []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig {
+ if o == nil {
+ return nil
+ }
+
+ objs := o.([]interface{})
+ if len(objs) == 0 || objs[0] == nil {
+ return nil
+ }
+
+ items := make([]WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig, 0, len(objs))
+ for _, item := range objs {
+ i := expandDataprocWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(item)
+ items = append(items, *i)
+ }
+
+ return items
+}
+
+func expandDataprocWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(o interface{}) *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig {
+ if o == nil {
+ return nil
+ }
+
+ obj := o.(map[string]interface{})
+ return &WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig{
+ DiskSizeGb: dcl.Int64OrNil(int64(obj["disk_size_gb"].(int))),
+ DiskType: dcl.StringOrNil(obj["disk_type"].(string)),
+ ProvisionedIops: dcl.Int64OrNil(int64(obj["provisioned_iops"].(int))),
+ ProvisionedThroughput: dcl.Int64OrNil(int64(obj["provisioned_throughput"].(int))),
+ }
+}
+
+func flattenDataprocWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigArray(objs []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig) []interface{} {
+ if objs == nil {
+ return nil
+ }
+
+ items := []interface{}{}
+ for _, item := range objs {
+ i := flattenDataprocWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(&item)
+ items = append(items, i)
+ }
+
+ return items
+}
+
+func flattenDataprocWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(obj *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig) interface{} {
+ if obj == nil || obj.Empty() {
+ return nil
+ }
+ transformed := map[string]interface{}{
+ "disk_size_gb": obj.DiskSizeGb,
+ "disk_type": obj.DiskType,
+ "provisioned_iops": obj.ProvisionedIops,
+ "provisioned_throughput": obj.ProvisionedThroughput,
+ }
+
+ return transformed
+
+}
+
func flattenDataprocWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig(obj *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig) interface{} {
if obj == nil || obj.Empty() {
return nil
@@ -4762,9 +5115,13 @@ func expandDataprocWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDisk
}
obj := objArr[0].(map[string]interface{})
return &WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfig{
- BootDiskSizeGb: dcl.Int64OrNil(int64(obj["boot_disk_size_gb"].(int))),
- BootDiskType: dcl.StringOrNil(obj["boot_disk_type"].(string)),
- NumLocalSsds: dcl.Int64OrNil(int64(obj["num_local_ssds"].(int))),
+ BootDiskSizeGb: dcl.Int64OrNil(int64(obj["boot_disk_size_gb"].(int))),
+ BootDiskType: dcl.StringOrNil(obj["boot_disk_type"].(string)),
+ NumLocalSsds: dcl.Int64OrNil(int64(obj["num_local_ssds"].(int))),
+ BootDiskProvisionedIops: dcl.Int64OrNil(int64(obj["boot_disk_provisioned_iops"].(int))),
+ BootDiskProvisionedThroughput: dcl.Int64OrNil(int64(obj["boot_disk_provisioned_throughput"].(int))),
+ LocalSsdInterface: dcl.StringOrNil(obj["local_ssd_interface"].(string)),
+ AttachedDiskConfig: expandDataprocWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigArray(obj["attached_disk_config"]),
}
}
@@ -4773,15 +5130,81 @@ func flattenDataprocWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDis
return nil
}
transformed := map[string]interface{}{
- "boot_disk_size_gb": obj.BootDiskSizeGb,
- "boot_disk_type": obj.BootDiskType,
- "num_local_ssds": obj.NumLocalSsds,
+ "boot_disk_size_gb": obj.BootDiskSizeGb,
+ "boot_disk_type": obj.BootDiskType,
+ "num_local_ssds": obj.NumLocalSsds,
+ "boot_disk_provisioned_iops": obj.BootDiskProvisionedIops,
+ "boot_disk_provisioned_throughput": obj.BootDiskProvisionedThroughput,
+ "local_ssd_interface": obj.LocalSsdInterface,
+ "attached_disk_config": flattenDataprocWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigArray(obj.AttachedDiskConfig),
}
return []interface{}{transformed}
}
+func expandDataprocWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigArray(o interface{}) []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig {
+ if o == nil {
+ return nil
+ }
+
+ objs := o.([]interface{})
+ if len(objs) == 0 || objs[0] == nil {
+ return nil
+ }
+
+ items := make([]WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig, 0, len(objs))
+ for _, item := range objs {
+ i := expandDataprocWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(item)
+ items = append(items, *i)
+ }
+
+ return items
+}
+
+func expandDataprocWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(o interface{}) *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig {
+ if o == nil {
+ return nil
+ }
+
+ obj := o.(map[string]interface{})
+ return &WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig{
+ DiskSizeGb: dcl.Int64OrNil(int64(obj["disk_size_gb"].(int))),
+ DiskType: dcl.StringOrNil(obj["disk_type"].(string)),
+ ProvisionedIops: dcl.Int64OrNil(int64(obj["provisioned_iops"].(int))),
+ ProvisionedThroughput: dcl.Int64OrNil(int64(obj["provisioned_throughput"].(int))),
+ }
+}
+
+func flattenDataprocWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigArray(objs []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig) []interface{} {
+ if objs == nil {
+ return nil
+ }
+
+ items := []interface{}{}
+ for _, item := range objs {
+ i := flattenDataprocWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(&item)
+ items = append(items, i)
+ }
+
+ return items
+}
+
+func flattenDataprocWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(obj *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig) interface{} {
+ if obj == nil || obj.Empty() {
+ return nil
+ }
+ transformed := map[string]interface{}{
+ "disk_size_gb": obj.DiskSizeGb,
+ "disk_type": obj.DiskType,
+ "provisioned_iops": obj.ProvisionedIops,
+ "provisioned_throughput": obj.ProvisionedThroughput,
+ }
+
+ return transformed
+
+}
+
func flattenDataprocWorkflowTemplatePlacementManagedClusterConfigWorkerConfigManagedGroupConfig(obj *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigManagedGroupConfig) interface{} {
if obj == nil || obj.Empty() {
return nil
diff --git a/mmv1/third_party/terraform/services/dataproc/resource_dataproc_workflow_template_meta.yaml.tmpl b/mmv1/third_party/terraform/services/dataproc/resource_dataproc_workflow_template_meta.yaml.tmpl
index 8830b9f63474..eafdfcc82876 100644
--- a/mmv1/third_party/terraform/services/dataproc/resource_dataproc_workflow_template_meta.yaml.tmpl
+++ b/mmv1/third_party/terraform/services/dataproc/resource_dataproc_workflow_template_meta.yaml.tmpl
@@ -118,16 +118,38 @@ fields:
- api_field: 'placement.managedCluster.config.lifecycleConfig.idleStartTime'
- api_field: 'placement.managedCluster.config.masterConfig.accelerators.acceleratorCount'
- field: 'placement.managed_cluster.config.master_config.accelerators.accelerator_type'
+ - api_field: 'placement.managedCluster.config.masterConfig.diskConfig.attachedDiskConfigs.diskSizeGb'
+ field: 'placement.managed_cluster.config.master_config.disk_config.attached_disk_config.disk_size_gb'
+ - api_field: 'placement.managedCluster.config.masterConfig.diskConfig.attachedDiskConfigs.diskType'
+ field: 'placement.managed_cluster.config.master_config.disk_config.attached_disk_config.disk_type'
+ - api_field: 'placement.managedCluster.config.masterConfig.diskConfig.attachedDiskConfigs.provisionedIops'
+ field: 'placement.managed_cluster.config.master_config.disk_config.attached_disk_config.provisioned_iops'
+ - api_field: 'placement.managedCluster.config.masterConfig.diskConfig.attachedDiskConfigs.provisionedThroughput'
+ field: 'placement.managed_cluster.config.master_config.disk_config.attached_disk_config.provisioned_throughput'
+ - api_field: 'placement.managedCluster.config.masterConfig.diskConfig.bootDiskProvisionedIops'
+ - api_field: 'placement.managedCluster.config.masterConfig.diskConfig.bootDiskProvisionedThroughput'
- api_field: 'placement.managedCluster.config.masterConfig.diskConfig.bootDiskSizeGb'
- api_field: 'placement.managedCluster.config.masterConfig.diskConfig.bootDiskType'
+ - api_field: 'placement.managedCluster.config.masterConfig.diskConfig.localSsdInterface'
- api_field: 'placement.managedCluster.config.masterConfig.diskConfig.numLocalSsds'
- field: 'placement.managed_cluster.config.master_config.image'
- api_field: 'placement.managedCluster.config.masterConfig.instanceNames'
- api_field: 'placement.managedCluster.config.masterConfig.isPreemptible'
- field: 'placement.managed_cluster.config.master_config.machine_type'
- api_field: 'placement.managedCluster.config.masterConfig.instanceFlexibilityPolicy.instanceMachineTypes'
+ - api_field: 'placement.managedCluster.config.masterConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.attachedDiskConfigs.diskSizeGb'
+ field: 'placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_selection_list.disk_config.attached_disk_config.disk_size_gb'
+ - api_field: 'placement.managedCluster.config.masterConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.attachedDiskConfigs.diskType'
+ field: 'placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_selection_list.disk_config.attached_disk_config.disk_type'
+ - api_field: 'placement.managedCluster.config.masterConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.attachedDiskConfigs.provisionedIops'
+ field: 'placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_selection_list.disk_config.attached_disk_config.provisioned_iops'
+ - api_field: 'placement.managedCluster.config.masterConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.attachedDiskConfigs.provisionedThroughput'
+ field: 'placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_selection_list.disk_config.attached_disk_config.provisioned_throughput'
+ - api_field: 'placement.managedCluster.config.masterConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.bootDiskProvisionedIops'
+ - api_field: 'placement.managedCluster.config.masterConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.bootDiskProvisionedThroughput'
- api_field: 'placement.managedCluster.config.masterConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.bootDiskSizeGb'
- api_field: 'placement.managedCluster.config.masterConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.bootDiskType'
+ - api_field: 'placement.managedCluster.config.masterConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.localSsdInterface'
- api_field: 'placement.managedCluster.config.masterConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.numLocalSsds'
- api_field: 'placement.managedCluster.config.masterConfig.instanceFlexibilityPolicy.instanceSelectionList.machineTypes'
- api_field: 'placement.managedCluster.config.masterConfig.instanceFlexibilityPolicy.instanceSelectionList.rank'
@@ -143,16 +165,38 @@ fields:
{{- end }}
- api_field: 'placement.managedCluster.config.secondaryWorkerConfig.accelerators.acceleratorCount'
- field: 'placement.managed_cluster.config.secondary_worker_config.accelerators.accelerator_type'
+ - api_field: 'placement.managedCluster.config.secondaryWorkerConfig.diskConfig.attachedDiskConfigs.diskSizeGb'
+ field: 'placement.managed_cluster.config.secondary_worker_config.disk_config.attached_disk_config.disk_size_gb'
+ - api_field: 'placement.managedCluster.config.secondaryWorkerConfig.diskConfig.attachedDiskConfigs.diskType'
+ field: 'placement.managed_cluster.config.secondary_worker_config.disk_config.attached_disk_config.disk_type'
+ - api_field: 'placement.managedCluster.config.secondaryWorkerConfig.diskConfig.attachedDiskConfigs.provisionedIops'
+ field: 'placement.managed_cluster.config.secondary_worker_config.disk_config.attached_disk_config.provisioned_iops'
+ - api_field: 'placement.managedCluster.config.secondaryWorkerConfig.diskConfig.attachedDiskConfigs.provisionedThroughput'
+ field: 'placement.managed_cluster.config.secondary_worker_config.disk_config.attached_disk_config.provisioned_throughput'
+ - api_field: 'placement.managedCluster.config.secondaryWorkerConfig.diskConfig.bootDiskProvisionedIops'
+ - api_field: 'placement.managedCluster.config.secondaryWorkerConfig.diskConfig.bootDiskProvisionedThroughput'
- api_field: 'placement.managedCluster.config.secondaryWorkerConfig.diskConfig.bootDiskSizeGb'
- api_field: 'placement.managedCluster.config.secondaryWorkerConfig.diskConfig.bootDiskType'
+ - api_field: 'placement.managedCluster.config.secondaryWorkerConfig.diskConfig.localSsdInterface'
- api_field: 'placement.managedCluster.config.secondaryWorkerConfig.diskConfig.numLocalSsds'
- field: 'placement.managed_cluster.config.secondary_worker_config.image'
- api_field: 'placement.managedCluster.config.secondaryWorkerConfig.instanceNames'
- api_field: 'placement.managedCluster.config.secondaryWorkerConfig.isPreemptible'
- field: 'placement.managed_cluster.config.secondary_worker_config.machine_type'
- api_field: 'placement.managedCluster.config.secondaryWorkerConfig.instanceFlexibilityPolicy.instanceMachineTypes'
+ - api_field: 'placement.managedCluster.config.secondaryWorkerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.attachedDiskConfigs.diskSizeGb'
+ field: 'placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_selection_list.disk_config.attached_disk_config.disk_size_gb'
+ - api_field: 'placement.managedCluster.config.secondaryWorkerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.attachedDiskConfigs.diskType'
+ field: 'placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_selection_list.disk_config.attached_disk_config.disk_type'
+ - api_field: 'placement.managedCluster.config.secondaryWorkerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.attachedDiskConfigs.provisionedIops'
+ field: 'placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_selection_list.disk_config.attached_disk_config.provisioned_iops'
+ - api_field: 'placement.managedCluster.config.secondaryWorkerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.attachedDiskConfigs.provisionedThroughput'
+ field: 'placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_selection_list.disk_config.attached_disk_config.provisioned_throughput'
+ - api_field: 'placement.managedCluster.config.secondaryWorkerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.bootDiskProvisionedIops'
+ - api_field: 'placement.managedCluster.config.secondaryWorkerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.bootDiskProvisionedThroughput'
- api_field: 'placement.managedCluster.config.secondaryWorkerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.bootDiskSizeGb'
- api_field: 'placement.managedCluster.config.secondaryWorkerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.bootDiskType'
+ - api_field: 'placement.managedCluster.config.secondaryWorkerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.localSsdInterface'
- api_field: 'placement.managedCluster.config.secondaryWorkerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.numLocalSsds'
- api_field: 'placement.managedCluster.config.secondaryWorkerConfig.instanceFlexibilityPolicy.instanceSelectionList.machineTypes'
- api_field: 'placement.managedCluster.config.secondaryWorkerConfig.instanceFlexibilityPolicy.instanceSelectionList.rank'
@@ -187,16 +231,38 @@ fields:
- api_field: 'placement.managedCluster.config.tempBucket'
- api_field: 'placement.managedCluster.config.workerConfig.accelerators.acceleratorCount'
- field: 'placement.managed_cluster.config.worker_config.accelerators.accelerator_type'
+ - api_field: 'placement.managedCluster.config.workerConfig.diskConfig.attachedDiskConfigs.diskSizeGb'
+ field: 'placement.managed_cluster.config.worker_config.disk_config.attached_disk_config.disk_size_gb'
+ - api_field: 'placement.managedCluster.config.workerConfig.diskConfig.attachedDiskConfigs.diskType'
+ field: 'placement.managed_cluster.config.worker_config.disk_config.attached_disk_config.disk_type'
+ - api_field: 'placement.managedCluster.config.workerConfig.diskConfig.attachedDiskConfigs.provisionedIops'
+ field: 'placement.managed_cluster.config.worker_config.disk_config.attached_disk_config.provisioned_iops'
+ - api_field: 'placement.managedCluster.config.workerConfig.diskConfig.attachedDiskConfigs.provisionedThroughput'
+ field: 'placement.managed_cluster.config.worker_config.disk_config.attached_disk_config.provisioned_throughput'
+ - api_field: 'placement.managedCluster.config.workerConfig.diskConfig.bootDiskProvisionedIops'
+ - api_field: 'placement.managedCluster.config.workerConfig.diskConfig.bootDiskProvisionedThroughput'
- api_field: 'placement.managedCluster.config.workerConfig.diskConfig.bootDiskSizeGb'
- api_field: 'placement.managedCluster.config.workerConfig.diskConfig.bootDiskType'
+ - api_field: 'placement.managedCluster.config.workerConfig.diskConfig.localSsdInterface'
- api_field: 'placement.managedCluster.config.workerConfig.diskConfig.numLocalSsds'
- field: 'placement.managed_cluster.config.worker_config.image'
- api_field: 'placement.managedCluster.config.workerConfig.instanceNames'
- api_field: 'placement.managedCluster.config.workerConfig.isPreemptible'
- field: 'placement.managed_cluster.config.worker_config.machine_type'
- api_field: 'placement.managedCluster.config.workerConfig.instanceFlexibilityPolicy.instanceMachineTypes'
+ - api_field: 'placement.managedCluster.config.workerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.attachedDiskConfigs.diskSizeGb'
+ field: 'placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_selection_list.disk_config.attached_disk_config.disk_size_gb'
+ - api_field: 'placement.managedCluster.config.workerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.attachedDiskConfigs.diskType'
+ field: 'placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_selection_list.disk_config.attached_disk_config.disk_type'
+ - api_field: 'placement.managedCluster.config.workerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.attachedDiskConfigs.provisionedIops'
+ field: 'placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_selection_list.disk_config.attached_disk_config.provisioned_iops'
+ - api_field: 'placement.managedCluster.config.workerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.attachedDiskConfigs.provisionedThroughput'
+ field: 'placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_selection_list.disk_config.attached_disk_config.provisioned_throughput'
+ - api_field: 'placement.managedCluster.config.workerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.bootDiskProvisionedIops'
+ - api_field: 'placement.managedCluster.config.workerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.bootDiskProvisionedThroughput'
- api_field: 'placement.managedCluster.config.workerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.bootDiskSizeGb'
- api_field: 'placement.managedCluster.config.workerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.bootDiskType'
+ - api_field: 'placement.managedCluster.config.workerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.localSsdInterface'
- api_field: 'placement.managedCluster.config.workerConfig.instanceFlexibilityPolicy.instanceSelectionList.diskConfig.numLocalSsds'
- api_field: 'placement.managedCluster.config.workerConfig.instanceFlexibilityPolicy.instanceSelectionList.machineTypes'
- api_field: 'placement.managedCluster.config.workerConfig.instanceFlexibilityPolicy.instanceSelectionList.rank'
diff --git a/mmv1/third_party/terraform/services/dataproc/resource_dataproc_workflow_template_test.go.tmpl b/mmv1/third_party/terraform/services/dataproc/resource_dataproc_workflow_template_test.go.tmpl
index 34135ca741be..a44042abcb72 100644
--- a/mmv1/third_party/terraform/services/dataproc/resource_dataproc_workflow_template_test.go.tmpl
+++ b/mmv1/third_party/terraform/services/dataproc/resource_dataproc_workflow_template_test.go.tmpl
@@ -319,26 +319,42 @@ func TestAccDataprocWorkflowTemplate_instanceFlexibilityPolicy(t *testing.T) {
{
Config: testAccDataprocWorkflowTemplate_instanceFlexibilityPolicy(context),
Check: resource.ComposeTestCheckFunc(
- resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.instance_flexibility_policy.0.instance_selection_list.0.machine_types.0", "e2-standard-2"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.instance_flexibility_policy.0.instance_selection_list.0.machine_types.0", "n4-standard-2"),
resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.instance_flexibility_policy.0.instance_selection_list.0.rank", "0"),
- resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_type", "pd-ssd"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_type", "hyperdisk-balanced"),
resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_size_gb", "35"),
- resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.num_local_ssds", "1"),
- resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.machine_types.0", "n2d-standard-2"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_provisioned_iops", "3000"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_provisioned_throughput", "140"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.attached_disk_config.0.disk_size_gb", "100"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.attached_disk_config.0.disk_type", "HYPERDISK_BALANCED"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.attached_disk_config.0.provisioned_iops", "3000"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.attached_disk_config.0.provisioned_throughput", "140"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.machine_types.0", "n4-standard-2"),
resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.rank", "1"),
- resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_type", "pd-ssd"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_type", "hyperdisk-balanced"),
resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_size_gb", "35"),
- resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.num_local_ssds", "1"),
- resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.1.machine_types.0", "e2-standard-2"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_provisioned_iops", "3000"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_provisioned_throughput", "140"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.attached_disk_config.0.disk_size_gb", "100"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.attached_disk_config.0.disk_type", "HYPERDISK_BALANCED"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.attached_disk_config.0.provisioned_iops", "3000"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.attached_disk_config.0.provisioned_throughput", "140"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.1.machine_types.0", "n2-standard-2"),
resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.1.rank", "2"),
resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.1.disk_config.0.boot_disk_type", "pd-standard"),
resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.1.disk_config.0.boot_disk_size_gb", "35"),
- resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.machine_types.0", "n1-standard-2"),
- resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.machine_types.1", "n2-standard-2"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.1.disk_config.0.num_local_ssds", "1"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.instance_flexibility_policy.0.instance_selection_list.1.disk_config.0.local_ssd_interface", "scsi"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.machine_types.0", "n4-standard-2"),
resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.rank", "1"),
- resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_type", "pd-ssd"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_type", "hyperdisk-balanced"),
resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_size_gb", "35"),
- resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.num_local_ssds", "1"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_provisioned_iops", "3000"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.boot_disk_provisioned_throughput", "140"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.attached_disk_config.0.disk_size_gb", "100"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.attached_disk_config.0.disk_type", "HYPERDISK_BALANCED"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.attached_disk_config.0.provisioned_iops", "3000"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.instance_selection_list.0.disk_config.0.attached_disk_config.0.provisioned_throughput", "140"),
resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.provisioning_model_mix.0.standard_capacity_base", "0"),
resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.instance_flexibility_policy.0.provisioning_model_mix.0.standard_capacity_percent_above_base", "50"),
),
@@ -369,12 +385,19 @@ resource "google_dataproc_workflow_template" "template" {
num_instances = 1
instance_flexibility_policy {
instance_selection_list {
- machine_types = ["e2-standard-2"]
+ machine_types = ["n4-standard-2"]
rank = 0
disk_config {
- boot_disk_type = "pd-ssd"
- boot_disk_size_gb = 35
- num_local_ssds = 1
+ boot_disk_type = "hyperdisk-balanced"
+ boot_disk_size_gb = 35
+ boot_disk_provisioned_iops = 3000
+ boot_disk_provisioned_throughput = 140
+ attached_disk_config {
+ disk_size_gb = 100
+ disk_type = "HYPERDISK_BALANCED"
+ provisioned_iops = 3000
+ provisioned_throughput = 140
+ }
}
}
}
@@ -383,20 +406,29 @@ resource "google_dataproc_workflow_template" "template" {
num_instances = 2
instance_flexibility_policy {
instance_selection_list {
- machine_types = ["n2d-standard-2"]
+ machine_types = ["n4-standard-2"]
rank = 1
disk_config {
- boot_disk_type = "pd-ssd"
- boot_disk_size_gb = 35
- num_local_ssds = 1
+ boot_disk_type = "hyperdisk-balanced"
+ boot_disk_size_gb = 35
+ boot_disk_provisioned_iops = 3000
+ boot_disk_provisioned_throughput = 140
+ attached_disk_config {
+ disk_size_gb = 100
+ disk_type = "HYPERDISK_BALANCED"
+ provisioned_iops = 3000
+ provisioned_throughput = 140
+ }
}
}
instance_selection_list {
- machine_types = ["e2-standard-2"]
+ machine_types = ["n2-standard-2"]
rank = 2
disk_config {
- boot_disk_type = "pd-standard"
- boot_disk_size_gb = 35
+ boot_disk_type = "pd-standard"
+ boot_disk_size_gb = 35
+ num_local_ssds = 1
+ local_ssd_interface = "scsi"
}
}
}
@@ -405,12 +437,19 @@ resource "google_dataproc_workflow_template" "template" {
num_instances = 2
instance_flexibility_policy {
instance_selection_list {
- machine_types = ["n1-standard-2", "n2-standard-2"]
+ machine_types = ["n4-standard-2"]
rank = 1
disk_config {
- boot_disk_type = "pd-ssd"
- boot_disk_size_gb = 35
- num_local_ssds = 1
+ boot_disk_type = "hyperdisk-balanced"
+ boot_disk_size_gb = 35
+ boot_disk_provisioned_iops = 3000
+ boot_disk_provisioned_throughput = 140
+ attached_disk_config {
+ disk_size_gb = 100
+ disk_type = "HYPERDISK_BALANCED"
+ provisioned_iops = 3000
+ provisioned_throughput = 140
+ }
}
}
provisioning_model_mix {
@@ -422,7 +461,136 @@ resource "google_dataproc_workflow_template" "template" {
}
}
}
+ jobs {
+ step_id = "someJob"
+ spark_job {
+ main_class = "SomeClass"
+ }
+ }
+}
+
+`, context)
+}
+func TestAccDataprocWorkflowTemplate_diskConfig(t *testing.T) {
+ t.Parallel()
+
+ context := map[string]interface{}{
+ "random_suffix": acctest.RandString(t, 10),
+ "project": envvar.GetTestProjectFromEnv(),
+ "version": "2.0.35-debian10",
+ }
+
+ acctest.VcrTest(t, resource.TestCase{
+ PreCheck: func() { acctest.AccTestPreCheck(t) },
+ ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
+ CheckDestroy: funcAccTestDataprocWorkflowTemplateCheckDestroy(t),
+ ExternalProviders: map[string]resource.ExternalProvider{
+ "random": {},
+ },
+ Steps: []resource.TestStep{
+ {
+ Config: testAccDataprocWorkflowTemplate_diskConfig(context),
+ Check: resource.ComposeTestCheckFunc(
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.disk_config.0.boot_disk_type", "hyperdisk-balanced"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.disk_config.0.boot_disk_size_gb", "500"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.disk_config.0.boot_disk_provisioned_iops", "3000"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.disk_config.0.boot_disk_provisioned_throughput", "140"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.disk_config.0.attached_disk_config.0.disk_type", "HYPERDISK_BALANCED"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.disk_config.0.attached_disk_config.0.disk_size_gb", "100"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.disk_config.0.attached_disk_config.0.provisioned_iops", "3000"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.master_config.0.disk_config.0.attached_disk_config.0.provisioned_throughput", "140"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.disk_config.0.boot_disk_type", "hyperdisk-balanced"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.disk_config.0.boot_disk_size_gb", "500"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.disk_config.0.boot_disk_provisioned_iops", "3000"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.disk_config.0.boot_disk_provisioned_throughput", "140"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.disk_config.0.attached_disk_config.0.disk_type", "HYPERDISK_BALANCED"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.disk_config.0.attached_disk_config.0.disk_size_gb", "100"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.disk_config.0.attached_disk_config.0.provisioned_iops", "3000"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.worker_config.0.disk_config.0.attached_disk_config.0.provisioned_throughput", "140"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.disk_config.0.boot_disk_type", "hyperdisk-balanced"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.disk_config.0.boot_disk_size_gb", "500"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.disk_config.0.boot_disk_provisioned_iops", "3000"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.disk_config.0.boot_disk_provisioned_throughput", "140"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.disk_config.0.attached_disk_config.0.disk_type", "HYPERDISK_BALANCED"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.disk_config.0.attached_disk_config.0.disk_size_gb", "100"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.disk_config.0.attached_disk_config.0.provisioned_iops", "3000"),
+ resource.TestCheckResourceAttr("google_dataproc_workflow_template.template", "placement.0.managed_cluster.0.config.0.secondary_worker_config.0.disk_config.0.attached_disk_config.0.provisioned_throughput", "140"),
+ ),
+ },
+ {
+ ImportState: true,
+ ImportStateVerify: true,
+ ImportStateVerifyIgnore: []string{"labels", "terraform_labels"},
+ ResourceName: "google_dataproc_workflow_template.template",
+ },
+ },
+ })
+}
+
+func testAccDataprocWorkflowTemplate_diskConfig(context map[string]interface{}) string {
+ return acctest.Nprintf(`
+resource "google_dataproc_workflow_template" "template" {
+ name = "tf-test-workflow-%{random_suffix}"
+ location = "us-central1"
+ placement {
+ managed_cluster {
+ cluster_name = "tf-test-cluster-%{random_suffix}"
+ config {
+ software_config {
+ image_version = "%{version}"
+ }
+ master_config {
+ num_instances = 1
+ machine_type = "n4-standard-2"
+ disk_config {
+ boot_disk_type = "hyperdisk-balanced"
+ boot_disk_size_gb = 500
+ boot_disk_provisioned_iops = 3000
+ boot_disk_provisioned_throughput = 140
+ attached_disk_config {
+ disk_type = "HYPERDISK_BALANCED"
+ disk_size_gb = 100
+ provisioned_iops = 3000
+ provisioned_throughput = 140
+ }
+ }
+ }
+ worker_config {
+ num_instances = 2
+ machine_type = "n4-standard-2"
+ disk_config {
+ boot_disk_type = "hyperdisk-balanced"
+ boot_disk_size_gb = 500
+ boot_disk_provisioned_iops = 3000
+ boot_disk_provisioned_throughput = 140
+ attached_disk_config {
+ disk_type = "HYPERDISK_BALANCED"
+ disk_size_gb = 100
+ provisioned_iops = 3000
+ provisioned_throughput = 140
+ }
+ }
+ }
+ secondary_worker_config {
+ num_instances = 1
+ machine_type = "n4-standard-2"
+ disk_config {
+ boot_disk_type = "hyperdisk-balanced"
+ boot_disk_size_gb = 500
+ boot_disk_provisioned_iops = 3000
+ boot_disk_provisioned_throughput = 140
+ attached_disk_config {
+ disk_type = "HYPERDISK_BALANCED"
+ disk_size_gb = 100
+ provisioned_iops = 3000
+ provisioned_throughput = 140
+ }
+ }
+ }
+ }
+ }
+ }
jobs {
step_id = "someJob"
spark_job {
@@ -430,6 +598,7 @@ resource "google_dataproc_workflow_template" "template" {
}
}
}
+
`, context)
}
diff --git a/mmv1/third_party/terraform/services/dataproc/workflow_template.go.tmpl b/mmv1/third_party/terraform/services/dataproc/workflow_template.go.tmpl
index 053f2970b6a8..91e4aeb39a0f 100644
--- a/mmv1/third_party/terraform/services/dataproc/workflow_template.go.tmpl
+++ b/mmv1/third_party/terraform/services/dataproc/workflow_template.go.tmpl
@@ -738,10 +738,14 @@ func (r *WorkflowTemplatePlacementManagedClusterConfigMasterConfig) HashCode() s
}
type WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig struct {
- empty bool `json:"-"`
- BootDiskType *string `json:"bootDiskType"`
- BootDiskSizeGb *int64 `json:"bootDiskSizeGb"`
- NumLocalSsds *int64 `json:"numLocalSsds"`
+ empty bool `json:"-"`
+ BootDiskType *string `json:"bootDiskType"`
+ BootDiskSizeGb *int64 `json:"bootDiskSizeGb"`
+ NumLocalSsds *int64 `json:"numLocalSsds"`
+ BootDiskProvisionedIops *int64 `json:"bootDiskProvisionedIops"`
+ BootDiskProvisionedThroughput *int64 `json:"bootDiskProvisionedThroughput"`
+ LocalSsdInterface *string `json:"localSsdInterface"`
+ AttachedDiskConfig []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig `json:"attachedDiskConfigs"`
}
type jsonWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig
@@ -765,6 +769,14 @@ func (r *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig) Un
r.NumLocalSsds = res.NumLocalSsds
+ r.BootDiskProvisionedIops = res.BootDiskProvisionedIops
+
+ r.BootDiskProvisionedThroughput = res.BootDiskProvisionedThroughput
+
+ r.LocalSsdInterface = res.LocalSsdInterface
+
+ r.AttachedDiskConfig = res.AttachedDiskConfig
+
}
return nil
}
@@ -789,6 +801,61 @@ func (r *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig) Ha
return fmt.Sprintf("%x", hash)
}
+type WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig struct {
+ empty bool `json:"-"`
+ DiskType *string `json:"diskType"`
+ DiskSizeGb *int64 `json:"diskSizeGb"`
+ ProvisionedIops *int64 `json:"provisionedIops"`
+ ProvisionedThroughput *int64 `json:"provisionedThroughput"`
+}
+
+type jsonWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig
+
+func (r *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig) UnmarshalJSON(data []byte) error {
+ var res jsonWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig
+ if err := json.Unmarshal(data, &res); err != nil {
+ return err
+ }
+
+ var m map[string]interface{}
+ json.Unmarshal(data, &m)
+
+ if len(m) == 0 {
+ *r = *EmptyWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig
+ } else {
+
+ r.DiskType = res.DiskType
+
+ r.DiskSizeGb = res.DiskSizeGb
+
+ r.ProvisionedIops = res.ProvisionedIops
+
+ r.ProvisionedThroughput = res.ProvisionedThroughput
+
+ }
+ return nil
+}
+
+// This object is used to assert a desired state where this WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig is
+// empty. Go lacks global const objects, but this object should be treated
+// as one. Modifying this object will have undesirable results.
+var EmptyWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig = &WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig{empty: true}
+
+func (r *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig) Empty() bool {
+ return r.empty
+}
+
+func (r *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig) String() string {
+ return dcl.SprintResource(r)
+}
+
+func (r *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig) HashCode() string {
+ // Placeholder for a more complex hash method that handles ordering, etc
+ // Hash resource body for easy comparison later
+ hash := sha256.Sum256([]byte(r.String()))
+ return fmt.Sprintf("%x", hash)
+}
+
type WorkflowTemplatePlacementManagedClusterConfigMasterConfigManagedGroupConfig struct {
empty bool `json:"-"`
InstanceTemplateName *string `json:"instanceTemplateName"`
@@ -1117,10 +1184,14 @@ func (r *WorkflowTemplatePlacementManagedClusterConfigWorkerConfig) HashCode() s
}
type WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfig struct {
- empty bool `json:"-"`
- BootDiskType *string `json:"bootDiskType"`
- BootDiskSizeGb *int64 `json:"bootDiskSizeGb"`
- NumLocalSsds *int64 `json:"numLocalSsds"`
+ empty bool `json:"-"`
+ BootDiskType *string `json:"bootDiskType"`
+ BootDiskSizeGb *int64 `json:"bootDiskSizeGb"`
+ NumLocalSsds *int64 `json:"numLocalSsds"`
+ BootDiskProvisionedIops *int64 `json:"bootDiskProvisionedIops"`
+ BootDiskProvisionedThroughput *int64 `json:"bootDiskProvisionedThroughput"`
+ LocalSsdInterface *string `json:"localSsdInterface"`
+ AttachedDiskConfig []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig `json:"attachedDiskConfigs"`
}
type jsonWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfig WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfig
@@ -1144,6 +1215,14 @@ func (r *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfig) Un
r.NumLocalSsds = res.NumLocalSsds
+ r.BootDiskProvisionedIops = res.BootDiskProvisionedIops
+
+ r.BootDiskProvisionedThroughput = res.BootDiskProvisionedThroughput
+
+ r.LocalSsdInterface = res.LocalSsdInterface
+
+ r.AttachedDiskConfig = res.AttachedDiskConfig
+
}
return nil
}
@@ -1168,6 +1247,61 @@ func (r *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfig) Ha
return fmt.Sprintf("%x", hash)
}
+type WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig struct {
+ empty bool `json:"-"`
+ DiskType *string `json:"diskType"`
+ DiskSizeGb *int64 `json:"diskSizeGb"`
+ ProvisionedIops *int64 `json:"provisionedIops"`
+ ProvisionedThroughput *int64 `json:"provisionedThroughput"`
+}
+
+type jsonWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig
+
+func (r *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig) UnmarshalJSON(data []byte) error {
+ var res jsonWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig
+ if err := json.Unmarshal(data, &res); err != nil {
+ return err
+ }
+
+ var m map[string]interface{}
+ json.Unmarshal(data, &m)
+
+ if len(m) == 0 {
+ *r = *EmptyWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig
+ } else {
+
+ r.DiskType = res.DiskType
+
+ r.DiskSizeGb = res.DiskSizeGb
+
+ r.ProvisionedIops = res.ProvisionedIops
+
+ r.ProvisionedThroughput = res.ProvisionedThroughput
+
+ }
+ return nil
+}
+
+// This object is used to assert a desired state where this WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig is
+// empty. Go lacks global const objects, but this object should be treated
+// as one. Modifying this object will have undesirable results.
+var EmptyWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig = &WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig{empty: true}
+
+func (r *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig) Empty() bool {
+ return r.empty
+}
+
+func (r *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig) String() string {
+ return dcl.SprintResource(r)
+}
+
+func (r *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig) HashCode() string {
+ // Placeholder for a more complex hash method that handles ordering, etc
+ // Hash resource body for easy comparison later
+ hash := sha256.Sum256([]byte(r.String()))
+ return fmt.Sprintf("%x", hash)
+}
+
type WorkflowTemplatePlacementManagedClusterConfigWorkerConfigManagedGroupConfig struct {
empty bool `json:"-"`
InstanceTemplateName *string `json:"instanceTemplateName"`
@@ -1496,10 +1630,14 @@ func (r *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfig) Has
}
type WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfig struct {
- empty bool `json:"-"`
- BootDiskType *string `json:"bootDiskType"`
- BootDiskSizeGb *int64 `json:"bootDiskSizeGb"`
- NumLocalSsds *int64 `json:"numLocalSsds"`
+ empty bool `json:"-"`
+ BootDiskType *string `json:"bootDiskType"`
+ BootDiskSizeGb *int64 `json:"bootDiskSizeGb"`
+ NumLocalSsds *int64 `json:"numLocalSsds"`
+ BootDiskProvisionedIops *int64 `json:"bootDiskProvisionedIops"`
+ BootDiskProvisionedThroughput *int64 `json:"bootDiskProvisionedThroughput"`
+ LocalSsdInterface *string `json:"localSsdInterface"`
+ AttachedDiskConfig []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig `json:"attachedDiskConfigs"`
}
type jsonWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfig WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfig
@@ -1523,6 +1661,14 @@ func (r *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskC
r.NumLocalSsds = res.NumLocalSsds
+ r.BootDiskProvisionedIops = res.BootDiskProvisionedIops
+
+ r.BootDiskProvisionedThroughput = res.BootDiskProvisionedThroughput
+
+ r.LocalSsdInterface = res.LocalSsdInterface
+
+ r.AttachedDiskConfig = res.AttachedDiskConfig
+
}
return nil
}
@@ -1547,6 +1693,61 @@ func (r *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskC
return fmt.Sprintf("%x", hash)
}
+type WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig struct {
+ empty bool `json:"-"`
+ DiskType *string `json:"diskType"`
+ DiskSizeGb *int64 `json:"diskSizeGb"`
+ ProvisionedIops *int64 `json:"provisionedIops"`
+ ProvisionedThroughput *int64 `json:"provisionedThroughput"`
+}
+
+type jsonWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig
+
+func (r *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig) UnmarshalJSON(data []byte) error {
+ var res jsonWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig
+ if err := json.Unmarshal(data, &res); err != nil {
+ return err
+ }
+
+ var m map[string]interface{}
+ json.Unmarshal(data, &m)
+
+ if len(m) == 0 {
+ *r = *EmptyWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig
+ } else {
+
+ r.DiskType = res.DiskType
+
+ r.DiskSizeGb = res.DiskSizeGb
+
+ r.ProvisionedIops = res.ProvisionedIops
+
+ r.ProvisionedThroughput = res.ProvisionedThroughput
+
+ }
+ return nil
+}
+
+// This object is used to assert a desired state where this WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig is
+// empty. Go lacks global const objects, but this object should be treated
+// as one. Modifying this object will have undesirable results.
+var EmptyWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig = &WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig{empty: true}
+
+func (r *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig) Empty() bool {
+ return r.empty
+}
+
+func (r *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig) String() string {
+ return dcl.SprintResource(r)
+}
+
+func (r *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig) HashCode() string {
+ // Placeholder for a more complex hash method that handles ordering, etc
+ // Hash resource body for easy comparison later
+ hash := sha256.Sum256([]byte(r.String()))
+ return fmt.Sprintf("%x", hash)
+}
+
type WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig struct {
empty bool `json:"-"`
InstanceTemplateName *string `json:"instanceTemplateName"`
diff --git a/mmv1/third_party/terraform/services/dataproc/workflow_template_internal.go.tmpl b/mmv1/third_party/terraform/services/dataproc/workflow_template_internal.go.tmpl
index 120b1bff6f64..95c700613ff8 100644
--- a/mmv1/third_party/terraform/services/dataproc/workflow_template_internal.go.tmpl
+++ b/mmv1/third_party/terraform/services/dataproc/workflow_template_internal.go.tmpl
@@ -186,6 +186,9 @@ func (r *WorkflowTemplatePlacementManagedClusterConfigMasterConfig) validate() e
func (r *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig) validate() error {
return nil
}
+func (r *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig) validate() error {
+ return nil
+}
func (r *WorkflowTemplatePlacementManagedClusterConfigMasterConfigManagedGroupConfig) validate() error {
return nil
}
@@ -222,6 +225,9 @@ func (r *WorkflowTemplatePlacementManagedClusterConfigWorkerConfig) validate() e
func (r *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfig) validate() error {
return nil
}
+func (r *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig) validate() error {
+ return nil
+}
func (r *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigManagedGroupConfig) validate() error {
return nil
}
@@ -258,6 +264,9 @@ func (r *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfig) val
func (r *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfig) validate() error {
return nil
}
+func (r *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig) validate() error {
+ return nil
+}
func (r *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig) validate() error {
return nil
}
@@ -2228,6 +2237,24 @@ func canonicalizeWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskCo
} else {
cDes.NumLocalSsds = des.NumLocalSsds
}
+ if dcl.IsZeroValue(des.BootDiskProvisionedIops) || (dcl.IsEmptyValueIndirect(des.BootDiskProvisionedIops) && dcl.IsEmptyValueIndirect(initial.BootDiskProvisionedIops)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.BootDiskProvisionedIops = initial.BootDiskProvisionedIops
+ } else {
+ cDes.BootDiskProvisionedIops = des.BootDiskProvisionedIops
+ }
+ if dcl.IsZeroValue(des.BootDiskProvisionedThroughput) || (dcl.IsEmptyValueIndirect(des.BootDiskProvisionedThroughput) && dcl.IsEmptyValueIndirect(initial.BootDiskProvisionedThroughput)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.BootDiskProvisionedThroughput = initial.BootDiskProvisionedThroughput
+ } else {
+ cDes.BootDiskProvisionedThroughput = des.BootDiskProvisionedThroughput
+ }
+ if dcl.StringCanonicalize(des.LocalSsdInterface, initial.LocalSsdInterface) || dcl.IsZeroValue(des.LocalSsdInterface) {
+ cDes.LocalSsdInterface = initial.LocalSsdInterface
+ } else {
+ cDes.LocalSsdInterface = des.LocalSsdInterface
+ }
+ cDes.AttachedDiskConfig = canonicalizeWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigSlice(des.AttachedDiskConfig, initial.AttachedDiskConfig, opts...)
return cDes
}
@@ -2277,6 +2304,10 @@ func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigMasterConfigDis
if dcl.StringCanonicalize(des.BootDiskType, nw.BootDiskType) {
nw.BootDiskType = des.BootDiskType
}
+ if dcl.StringCanonicalize(des.LocalSsdInterface, nw.LocalSsdInterface) {
+ nw.LocalSsdInterface = des.LocalSsdInterface
+ }
+ nw.AttachedDiskConfig = canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigSlice(c, des.AttachedDiskConfig, nw.AttachedDiskConfig)
return nw
}
@@ -2327,6 +2358,142 @@ func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigMasterConfigDis
return items
}
+func canonicalizeWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(des, initial *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig, opts ...dcl.ApplyOption) *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig {
+ if des == nil {
+ return initial
+ }
+ if des.empty {
+ return des
+ }
+
+ if initial == nil {
+ return des
+ }
+
+ cDes := &WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig{}
+
+ if dcl.StringCanonicalize(des.DiskType, initial.DiskType) || dcl.IsZeroValue(des.DiskType) {
+ cDes.DiskType = initial.DiskType
+ } else {
+ cDes.DiskType = des.DiskType
+ }
+ if dcl.IsZeroValue(des.DiskSizeGb) || (dcl.IsEmptyValueIndirect(des.DiskSizeGb) && dcl.IsEmptyValueIndirect(initial.DiskSizeGb)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.DiskSizeGb = initial.DiskSizeGb
+ } else {
+ cDes.DiskSizeGb = des.DiskSizeGb
+ }
+ if dcl.IsZeroValue(des.ProvisionedIops) || (dcl.IsEmptyValueIndirect(des.ProvisionedIops) && dcl.IsEmptyValueIndirect(initial.ProvisionedIops)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.ProvisionedIops = initial.ProvisionedIops
+ } else {
+ cDes.ProvisionedIops = des.ProvisionedIops
+ }
+ if dcl.IsZeroValue(des.ProvisionedThroughput) || (dcl.IsEmptyValueIndirect(des.ProvisionedThroughput) && dcl.IsEmptyValueIndirect(initial.ProvisionedThroughput)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.ProvisionedThroughput = initial.ProvisionedThroughput
+ } else {
+ cDes.ProvisionedThroughput = des.ProvisionedThroughput
+ }
+
+ return cDes
+}
+
+func canonicalizeWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigSlice(des, initial []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig, opts ...dcl.ApplyOption) []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig {
+ if des == nil {
+ return initial
+ }
+
+ if len(des) != len(initial) {
+
+ items := make([]WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig, 0, len(des))
+ for _, d := range des {
+ cd := canonicalizeWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(&d, nil, opts...)
+ if cd != nil {
+ items = append(items, *cd)
+ }
+ }
+ return items
+ }
+
+ items := make([]WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig, 0, len(des))
+ for i, d := range des {
+ cd := canonicalizeWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(&d, &initial[i], opts...)
+ if cd != nil {
+ items = append(items, *cd)
+ }
+ }
+ return items
+
+}
+
+func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(c *DclClient, des, nw *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig) *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig {
+
+ if des == nil {
+ return nw
+ }
+
+ if nw == nil {
+ if dcl.IsEmptyValueIndirect(des) {
+ c.Config.Logger.Info("Found explicitly empty value for WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig while comparing non-nil desired to nil actual. Returning desired object.")
+ return des
+ }
+ return nil
+ }
+
+ if dcl.StringCanonicalize(des.DiskType, nw.DiskType) {
+ nw.DiskType = des.DiskType
+ }
+
+ return nw
+}
+
+func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigSet(c *DclClient, des, nw []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig) []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig {
+ if des == nil {
+ return nw
+ }
+
+ // Find the elements in des that are also in nw and canonicalize them. Remove matched elements from nw.
+ var items []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig
+ for _, d := range des {
+ matchedIndex := -1
+ for i, n := range nw {
+ if diffs, _ := compareWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigNewStyle(&d, &n, dcl.FieldName{}); len(diffs) == 0 {
+ matchedIndex = i
+ break
+ }
+ }
+ if matchedIndex != -1 {
+ items = append(items, *canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(c, &d, &nw[matchedIndex]))
+ nw = append(nw[:matchedIndex], nw[matchedIndex+1:]...)
+ }
+ }
+ // Also include elements in nw that are not matched in des.
+ items = append(items, nw...)
+
+ return items
+}
+
+func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigSlice(c *DclClient, des, nw []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig) []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig {
+ if des == nil {
+ return nw
+ }
+
+ // Lengths are unequal. A diff will occur later, so we shouldn't canonicalize.
+ // Return the original array.
+ if len(des) != len(nw) {
+ return nw
+ }
+
+ var items []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig
+ for i, d := range des {
+ n := nw[i]
+ items = append(items, *canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(c, &d, &n))
+ }
+
+ return items
+}
+
func canonicalizeWorkflowTemplatePlacementManagedClusterConfigMasterConfigManagedGroupConfig(des, initial *WorkflowTemplatePlacementManagedClusterConfigMasterConfigManagedGroupConfig, opts ...dcl.ApplyOption) *WorkflowTemplatePlacementManagedClusterConfigMasterConfigManagedGroupConfig {
if des == nil {
return initial
@@ -3025,6 +3192,24 @@ func canonicalizeWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskCo
} else {
cDes.NumLocalSsds = des.NumLocalSsds
}
+ if dcl.IsZeroValue(des.BootDiskProvisionedIops) || (dcl.IsEmptyValueIndirect(des.BootDiskProvisionedIops) && dcl.IsEmptyValueIndirect(initial.BootDiskProvisionedIops)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.BootDiskProvisionedIops = initial.BootDiskProvisionedIops
+ } else {
+ cDes.BootDiskProvisionedIops = des.BootDiskProvisionedIops
+ }
+ if dcl.IsZeroValue(des.BootDiskProvisionedThroughput) || (dcl.IsEmptyValueIndirect(des.BootDiskProvisionedThroughput) && dcl.IsEmptyValueIndirect(initial.BootDiskProvisionedThroughput)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.BootDiskProvisionedThroughput = initial.BootDiskProvisionedThroughput
+ } else {
+ cDes.BootDiskProvisionedThroughput = des.BootDiskProvisionedThroughput
+ }
+ if dcl.StringCanonicalize(des.LocalSsdInterface, initial.LocalSsdInterface) || dcl.IsZeroValue(des.LocalSsdInterface) {
+ cDes.LocalSsdInterface = initial.LocalSsdInterface
+ } else {
+ cDes.LocalSsdInterface = des.LocalSsdInterface
+ }
+ cDes.AttachedDiskConfig = canonicalizeWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigSlice(des.AttachedDiskConfig, initial.AttachedDiskConfig, opts...)
return cDes
}
@@ -3074,6 +3259,10 @@ func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDis
if dcl.StringCanonicalize(des.BootDiskType, nw.BootDiskType) {
nw.BootDiskType = des.BootDiskType
}
+ if dcl.StringCanonicalize(des.LocalSsdInterface, nw.LocalSsdInterface) {
+ nw.LocalSsdInterface = des.LocalSsdInterface
+ }
+ nw.AttachedDiskConfig = canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigSlice(c, des.AttachedDiskConfig, nw.AttachedDiskConfig)
return nw
}
@@ -3124,6 +3313,142 @@ func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDis
return items
}
+func canonicalizeWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(des, initial *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig, opts ...dcl.ApplyOption) *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig {
+ if des == nil {
+ return initial
+ }
+ if des.empty {
+ return des
+ }
+
+ if initial == nil {
+ return des
+ }
+
+ cDes := &WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig{}
+
+ if dcl.StringCanonicalize(des.DiskType, initial.DiskType) || dcl.IsZeroValue(des.DiskType) {
+ cDes.DiskType = initial.DiskType
+ } else {
+ cDes.DiskType = des.DiskType
+ }
+ if dcl.IsZeroValue(des.DiskSizeGb) || (dcl.IsEmptyValueIndirect(des.DiskSizeGb) && dcl.IsEmptyValueIndirect(initial.DiskSizeGb)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.DiskSizeGb = initial.DiskSizeGb
+ } else {
+ cDes.DiskSizeGb = des.DiskSizeGb
+ }
+ if dcl.IsZeroValue(des.ProvisionedIops) || (dcl.IsEmptyValueIndirect(des.ProvisionedIops) && dcl.IsEmptyValueIndirect(initial.ProvisionedIops)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.ProvisionedIops = initial.ProvisionedIops
+ } else {
+ cDes.ProvisionedIops = des.ProvisionedIops
+ }
+ if dcl.IsZeroValue(des.ProvisionedThroughput) || (dcl.IsEmptyValueIndirect(des.ProvisionedThroughput) && dcl.IsEmptyValueIndirect(initial.ProvisionedThroughput)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.ProvisionedThroughput = initial.ProvisionedThroughput
+ } else {
+ cDes.ProvisionedThroughput = des.ProvisionedThroughput
+ }
+
+ return cDes
+}
+
+func canonicalizeWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigSlice(des, initial []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig, opts ...dcl.ApplyOption) []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig {
+ if des == nil {
+ return initial
+ }
+
+ if len(des) != len(initial) {
+
+ items := make([]WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig, 0, len(des))
+ for _, d := range des {
+ cd := canonicalizeWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(&d, nil, opts...)
+ if cd != nil {
+ items = append(items, *cd)
+ }
+ }
+ return items
+ }
+
+ items := make([]WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig, 0, len(des))
+ for i, d := range des {
+ cd := canonicalizeWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(&d, &initial[i], opts...)
+ if cd != nil {
+ items = append(items, *cd)
+ }
+ }
+ return items
+
+}
+
+func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(c *DclClient, des, nw *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig) *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig {
+
+ if des == nil {
+ return nw
+ }
+
+ if nw == nil {
+ if dcl.IsEmptyValueIndirect(des) {
+ c.Config.Logger.Info("Found explicitly empty value for WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig while comparing non-nil desired to nil actual. Returning desired object.")
+ return des
+ }
+ return nil
+ }
+
+ if dcl.StringCanonicalize(des.DiskType, nw.DiskType) {
+ nw.DiskType = des.DiskType
+ }
+
+ return nw
+}
+
+func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigSet(c *DclClient, des, nw []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig) []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig {
+ if des == nil {
+ return nw
+ }
+
+ // Find the elements in des that are also in nw and canonicalize them. Remove matched elements from nw.
+ var items []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig
+ for _, d := range des {
+ matchedIndex := -1
+ for i, n := range nw {
+ if diffs, _ := compareWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigNewStyle(&d, &n, dcl.FieldName{}); len(diffs) == 0 {
+ matchedIndex = i
+ break
+ }
+ }
+ if matchedIndex != -1 {
+ items = append(items, *canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(c, &d, &nw[matchedIndex]))
+ nw = append(nw[:matchedIndex], nw[matchedIndex+1:]...)
+ }
+ }
+ // Also include elements in nw that are not matched in des.
+ items = append(items, nw...)
+
+ return items
+}
+
+func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigSlice(c *DclClient, des, nw []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig) []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig {
+ if des == nil {
+ return nw
+ }
+
+ // Lengths are unequal. A diff will occur later, so we shouldn't canonicalize.
+ // Return the original array.
+ if len(des) != len(nw) {
+ return nw
+ }
+
+ var items []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig
+ for i, d := range des {
+ n := nw[i]
+ items = append(items, *canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(c, &d, &n))
+ }
+
+ return items
+}
+
func canonicalizeWorkflowTemplatePlacementManagedClusterConfigWorkerConfigManagedGroupConfig(des, initial *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigManagedGroupConfig, opts ...dcl.ApplyOption) *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigManagedGroupConfig {
if des == nil {
return initial
@@ -3732,6 +4057,24 @@ func canonicalizeWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerCon
} else {
cDes.NumLocalSsds = des.NumLocalSsds
}
+ if dcl.IsZeroValue(des.BootDiskProvisionedIops) || (dcl.IsEmptyValueIndirect(des.BootDiskProvisionedIops) && dcl.IsEmptyValueIndirect(initial.BootDiskProvisionedIops)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.BootDiskProvisionedIops = initial.BootDiskProvisionedIops
+ } else {
+ cDes.BootDiskProvisionedIops = des.BootDiskProvisionedIops
+ }
+ if dcl.IsZeroValue(des.BootDiskProvisionedThroughput) || (dcl.IsEmptyValueIndirect(des.BootDiskProvisionedThroughput) && dcl.IsEmptyValueIndirect(initial.BootDiskProvisionedThroughput)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.BootDiskProvisionedThroughput = initial.BootDiskProvisionedThroughput
+ } else {
+ cDes.BootDiskProvisionedThroughput = des.BootDiskProvisionedThroughput
+ }
+ if dcl.StringCanonicalize(des.LocalSsdInterface, initial.LocalSsdInterface) || dcl.IsZeroValue(des.LocalSsdInterface) {
+ cDes.LocalSsdInterface = initial.LocalSsdInterface
+ } else {
+ cDes.LocalSsdInterface = des.LocalSsdInterface
+ }
+ cDes.AttachedDiskConfig = canonicalizeWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigSlice(des.AttachedDiskConfig, initial.AttachedDiskConfig, opts...)
return cDes
}
@@ -3781,6 +4124,10 @@ func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigSecondaryWorker
if dcl.StringCanonicalize(des.BootDiskType, nw.BootDiskType) {
nw.BootDiskType = des.BootDiskType
}
+ if dcl.StringCanonicalize(des.LocalSsdInterface, nw.LocalSsdInterface) {
+ nw.LocalSsdInterface = des.LocalSsdInterface
+ }
+ nw.AttachedDiskConfig = canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigSlice(c, des.AttachedDiskConfig, nw.AttachedDiskConfig)
return nw
}
@@ -3831,7 +4178,7 @@ func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigSecondaryWorker
return items
}
-func canonicalizeWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig(des, initial *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig, opts ...dcl.ApplyOption) *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig {
+func canonicalizeWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(des, initial *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig, opts ...dcl.ApplyOption) *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig {
if des == nil {
return initial
}
@@ -3843,17 +4190,153 @@ func canonicalizeWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerCon
return des
}
- cDes := &WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig{}
-
- return cDes
-}
+ cDes := &WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig{}
-func canonicalizeWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfigSlice(des, initial []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig, opts ...dcl.ApplyOption) []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig {
- if dcl.IsEmptyValueIndirect(des) {
- return initial
+ if dcl.StringCanonicalize(des.DiskType, initial.DiskType) || dcl.IsZeroValue(des.DiskType) {
+ cDes.DiskType = initial.DiskType
+ } else {
+ cDes.DiskType = des.DiskType
}
-
- if len(des) != len(initial) {
+ if dcl.IsZeroValue(des.DiskSizeGb) || (dcl.IsEmptyValueIndirect(des.DiskSizeGb) && dcl.IsEmptyValueIndirect(initial.DiskSizeGb)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.DiskSizeGb = initial.DiskSizeGb
+ } else {
+ cDes.DiskSizeGb = des.DiskSizeGb
+ }
+ if dcl.IsZeroValue(des.ProvisionedIops) || (dcl.IsEmptyValueIndirect(des.ProvisionedIops) && dcl.IsEmptyValueIndirect(initial.ProvisionedIops)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.ProvisionedIops = initial.ProvisionedIops
+ } else {
+ cDes.ProvisionedIops = des.ProvisionedIops
+ }
+ if dcl.IsZeroValue(des.ProvisionedThroughput) || (dcl.IsEmptyValueIndirect(des.ProvisionedThroughput) && dcl.IsEmptyValueIndirect(initial.ProvisionedThroughput)) {
+ // Desired and initial values are equivalent, so set canonical desired value to initial value.
+ cDes.ProvisionedThroughput = initial.ProvisionedThroughput
+ } else {
+ cDes.ProvisionedThroughput = des.ProvisionedThroughput
+ }
+
+ return cDes
+}
+
+func canonicalizeWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigSlice(des, initial []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig, opts ...dcl.ApplyOption) []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig {
+ if des == nil {
+ return initial
+ }
+
+ if len(des) != len(initial) {
+
+ items := make([]WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig, 0, len(des))
+ for _, d := range des {
+ cd := canonicalizeWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(&d, nil, opts...)
+ if cd != nil {
+ items = append(items, *cd)
+ }
+ }
+ return items
+ }
+
+ items := make([]WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig, 0, len(des))
+ for i, d := range des {
+ cd := canonicalizeWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(&d, &initial[i], opts...)
+ if cd != nil {
+ items = append(items, *cd)
+ }
+ }
+ return items
+
+}
+
+func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(c *DclClient, des, nw *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig) *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig {
+
+ if des == nil {
+ return nw
+ }
+
+ if nw == nil {
+ if dcl.IsEmptyValueIndirect(des) {
+ c.Config.Logger.Info("Found explicitly empty value for WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig while comparing non-nil desired to nil actual. Returning desired object.")
+ return des
+ }
+ return nil
+ }
+
+ if dcl.StringCanonicalize(des.DiskType, nw.DiskType) {
+ nw.DiskType = des.DiskType
+ }
+
+ return nw
+}
+
+func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigSet(c *DclClient, des, nw []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig) []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig {
+ if des == nil {
+ return nw
+ }
+
+ // Find the elements in des that are also in nw and canonicalize them. Remove matched elements from nw.
+ var items []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig
+ for _, d := range des {
+ matchedIndex := -1
+ for i, n := range nw {
+ if diffs, _ := compareWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigNewStyle(&d, &n, dcl.FieldName{}); len(diffs) == 0 {
+ matchedIndex = i
+ break
+ }
+ }
+ if matchedIndex != -1 {
+ items = append(items, *canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(c, &d, &nw[matchedIndex]))
+ nw = append(nw[:matchedIndex], nw[matchedIndex+1:]...)
+ }
+ }
+ // Also include elements in nw that are not matched in des.
+ items = append(items, nw...)
+
+ return items
+}
+
+func canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigSlice(c *DclClient, des, nw []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig) []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig {
+ if des == nil {
+ return nw
+ }
+
+ // Lengths are unequal. A diff will occur later, so we shouldn't canonicalize.
+ // Return the original array.
+ if len(des) != len(nw) {
+ return nw
+ }
+
+ var items []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig
+ for i, d := range des {
+ n := nw[i]
+ items = append(items, *canonicalizeNewWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(c, &d, &n))
+ }
+
+ return items
+}
+
+func canonicalizeWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig(des, initial *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig, opts ...dcl.ApplyOption) *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig {
+ if des == nil {
+ return initial
+ }
+ if des.empty {
+ return des
+ }
+
+ if initial == nil {
+ return des
+ }
+
+ cDes := &WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig{}
+
+ return cDes
+}
+
+func canonicalizeWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfigSlice(des, initial []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig, opts ...dcl.ApplyOption) []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig {
+ if dcl.IsEmptyValueIndirect(des) {
+ return initial
+ }
+
+ if len(des) != len(initial) {
items := make([]WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig, 0, len(des))
for _, d := range des {
@@ -9599,6 +10082,85 @@ func compareWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigN
}
diffs = append(diffs, ds...)
}
+
+ if ds, err := dcl.Diff(desired.BootDiskProvisionedIops, actual.BootDiskProvisionedIops, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("BootDiskProvisionedIops")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.BootDiskProvisionedThroughput, actual.BootDiskProvisionedThroughput, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("BootDiskProvisionedThroughput")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.LocalSsdInterface, actual.LocalSsdInterface, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("LocalSsdInterface")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.AttachedDiskConfig, actual.AttachedDiskConfig, dcl.DiffInfo{ObjectFunction: compareWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigNewStyle, EmptyObject: EmptyWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig, OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("AttachedDiskConfig")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+ return diffs, nil
+}
+
+func compareWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.FieldDiff, error) {
+ var diffs []*dcl.FieldDiff
+
+ desired, ok := d.(*WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig)
+ if !ok {
+ desiredNotPointer, ok := d.(WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig)
+ if !ok {
+ return nil, fmt.Errorf("obj %v is not a WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig or *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig", d)
+ }
+ desired = &desiredNotPointer
+ }
+ actual, ok := a.(*WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig)
+ if !ok {
+ actualNotPointer, ok := a.(WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig)
+ if !ok {
+ return nil, fmt.Errorf("obj %v is not a WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig", a)
+ }
+ actual = &actualNotPointer
+ }
+
+ if ds, err := dcl.Diff(desired.DiskType, actual.DiskType, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("DiskType")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.DiskSizeGb, actual.DiskSizeGb, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("DiskSizeGb")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.ProvisionedIops, actual.ProvisionedIops, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("ProvisionedIops")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.ProvisionedThroughput, actual.ProvisionedThroughput, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("ProvisionedThroughput")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
return diffs, nil
}
@@ -10067,6 +10629,85 @@ func compareWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigN
}
diffs = append(diffs, ds...)
}
+
+ if ds, err := dcl.Diff(desired.BootDiskProvisionedIops, actual.BootDiskProvisionedIops, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("BootDiskProvisionedIops")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.BootDiskProvisionedThroughput, actual.BootDiskProvisionedThroughput, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("BootDiskProvisionedThroughput")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.LocalSsdInterface, actual.LocalSsdInterface, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("LocalSsdInterface")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.AttachedDiskConfig, actual.AttachedDiskConfig, dcl.DiffInfo{ObjectFunction: compareWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigNewStyle, EmptyObject: EmptyWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig, OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("AttachedDiskConfig")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+ return diffs, nil
+}
+
+func compareWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.FieldDiff, error) {
+ var diffs []*dcl.FieldDiff
+
+ desired, ok := d.(*WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig)
+ if !ok {
+ desiredNotPointer, ok := d.(WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig)
+ if !ok {
+ return nil, fmt.Errorf("obj %v is not a WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig or *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig", d)
+ }
+ desired = &desiredNotPointer
+ }
+ actual, ok := a.(*WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig)
+ if !ok {
+ actualNotPointer, ok := a.(WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig)
+ if !ok {
+ return nil, fmt.Errorf("obj %v is not a WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig", a)
+ }
+ actual = &actualNotPointer
+ }
+
+ if ds, err := dcl.Diff(desired.DiskType, actual.DiskType, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("DiskType")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.DiskSizeGb, actual.DiskSizeGb, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("DiskSizeGb")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.ProvisionedIops, actual.ProvisionedIops, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("ProvisionedIops")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.ProvisionedThroughput, actual.ProvisionedThroughput, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("ProvisionedThroughput")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
return diffs, nil
}
@@ -10450,19 +11091,98 @@ func compareWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDi
}
diffs = append(diffs, ds...)
}
- return diffs, nil
-}
-
-func compareWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfigNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.FieldDiff, error) {
- var diffs []*dcl.FieldDiff
- desired, ok := d.(*WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig)
- if !ok {
- desiredNotPointer, ok := d.(WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig)
- if !ok {
- return nil, fmt.Errorf("obj %v is not a WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig or *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig", d)
+ if ds, err := dcl.Diff(desired.BootDiskProvisionedIops, actual.BootDiskProvisionedIops, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("BootDiskProvisionedIops")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
}
- desired = &desiredNotPointer
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.BootDiskProvisionedThroughput, actual.BootDiskProvisionedThroughput, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("BootDiskProvisionedThroughput")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.LocalSsdInterface, actual.LocalSsdInterface, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("LocalSsdInterface")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.AttachedDiskConfig, actual.AttachedDiskConfig, dcl.DiffInfo{ObjectFunction: compareWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigNewStyle, EmptyObject: EmptyWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig, OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("AttachedDiskConfig")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+ return diffs, nil
+}
+
+func compareWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.FieldDiff, error) {
+ var diffs []*dcl.FieldDiff
+
+ desired, ok := d.(*WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig)
+ if !ok {
+ desiredNotPointer, ok := d.(WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig)
+ if !ok {
+ return nil, fmt.Errorf("obj %v is not a WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig or *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig", d)
+ }
+ desired = &desiredNotPointer
+ }
+ actual, ok := a.(*WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig)
+ if !ok {
+ actualNotPointer, ok := a.(WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig)
+ if !ok {
+ return nil, fmt.Errorf("obj %v is not a WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig", a)
+ }
+ actual = &actualNotPointer
+ }
+
+ if ds, err := dcl.Diff(desired.DiskType, actual.DiskType, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("DiskType")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.DiskSizeGb, actual.DiskSizeGb, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("DiskSizeGb")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.ProvisionedIops, actual.ProvisionedIops, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("ProvisionedIops")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ if ds, err := dcl.Diff(desired.ProvisionedThroughput, actual.ProvisionedThroughput, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("ProvisionedThroughput")); len(ds) != 0 || err != nil {
+ if err != nil {
+ return nil, err
+ }
+ diffs = append(diffs, ds...)
+ }
+
+ return diffs, nil
+}
+
+func compareWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfigNewStyle(d, a interface{}, fn dcl.FieldName) ([]*dcl.FieldDiff, error) {
+ var diffs []*dcl.FieldDiff
+
+ desired, ok := d.(*WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig)
+ if !ok {
+ desiredNotPointer, ok := d.(WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig)
+ if !ok {
+ return nil, fmt.Errorf("obj %v is not a WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig or *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig", d)
+ }
+ desired = &desiredNotPointer
}
actual, ok := a.(*WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig)
if !ok {
@@ -13664,6 +14384,20 @@ func expandWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig(c
if v := f.NumLocalSsds; !dcl.IsEmptyValueIndirect(v) {
m["numLocalSsds"] = v
}
+ if v := f.BootDiskProvisionedIops; !dcl.IsEmptyValueIndirect(v) {
+ m["bootDiskProvisionedIops"] = v
+ }
+ if v := f.BootDiskProvisionedThroughput; !dcl.IsEmptyValueIndirect(v) {
+ m["bootDiskProvisionedThroughput"] = v
+ }
+ if v := f.LocalSsdInterface; !dcl.IsEmptyValueIndirect(v) {
+ m["localSsdInterface"] = v
+ }
+ if v, err := expandWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigSlice(c, f.AttachedDiskConfig, res); err != nil {
+ return nil, err
+ } else if v != nil {
+ m["attachedDiskConfigs"] = v
+ }
return m, nil
}
@@ -13684,6 +14418,140 @@ func flattenWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig(
r.BootDiskType = dcl.FlattenString(m["bootDiskType"])
r.BootDiskSizeGb = dcl.FlattenInteger(m["bootDiskSizeGb"])
r.NumLocalSsds = dcl.FlattenInteger(m["numLocalSsds"])
+ r.BootDiskProvisionedIops = dcl.FlattenInteger(m["bootDiskProvisionedIops"])
+ r.BootDiskProvisionedThroughput = dcl.FlattenInteger(m["bootDiskProvisionedThroughput"])
+ r.LocalSsdInterface = dcl.FlattenString(m["localSsdInterface"])
+ attachedDiskConfigs := m["attachedDiskConfigs"]
+ if attachedDiskConfigs == nil {
+ attachedDiskConfigs = m["attachedDiskConfig"]
+ }
+ r.AttachedDiskConfig = flattenWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigSlice(c, attachedDiskConfigs, res)
+
+ return r
+}
+
+// expandWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigMap expands the contents of WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig into a JSON
+// request object.
+func expandWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigMap(c *DclClient, f map[string]WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig, res *WorkflowTemplate) (map[string]interface{}, error) {
+ if f == nil {
+ return nil, nil
+ }
+
+ items := make(map[string]interface{})
+ for k, item := range f {
+ i, err := expandWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(c, &item, res)
+ if err != nil {
+ return nil, err
+ }
+ if i != nil {
+ items[k] = i
+ }
+ }
+
+ return items, nil
+}
+
+// expandWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigSlice expands the contents of WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig into a JSON
+// request object.
+func expandWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigSlice(c *DclClient, f []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig, res *WorkflowTemplate) ([]map[string]interface{}, error) {
+ if f == nil {
+ return nil, nil
+ }
+
+ items := []map[string]interface{}{}
+ for _, item := range f {
+ i, err := expandWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(c, &item, res)
+ if err != nil {
+ return nil, err
+ }
+
+ items = append(items, i)
+ }
+
+ return items, nil
+}
+
+// flattenWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigMap flattens the contents of WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig from a JSON
+// response object.
+func flattenWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigMap(c *DclClient, i interface{}, res *WorkflowTemplate) map[string]WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig {
+ a, ok := i.(map[string]interface{})
+ if !ok {
+ return map[string]WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig{}
+ }
+
+ if len(a) == 0 {
+ return map[string]WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig{}
+ }
+
+ items := make(map[string]WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig)
+ for k, item := range a {
+ items[k] = *flattenWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(c, item.(map[string]interface{}), res)
+ }
+
+ return items
+}
+
+// flattenWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigSlice flattens the contents of WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig from a JSON
+// response object.
+func flattenWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfigSlice(c *DclClient, i interface{}, res *WorkflowTemplate) []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig {
+ a, ok := i.([]interface{})
+ if !ok {
+ return []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig{}
+ }
+
+ if len(a) == 0 {
+ return []WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig{}
+ }
+
+ items := make([]WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig, 0, len(a))
+ for _, item := range a {
+ items = append(items, *flattenWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(c, item.(map[string]interface{}), res))
+ }
+
+ return items
+}
+
+// expandWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig expands an instance of WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig into a JSON
+// request object.
+func expandWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(c *DclClient, f *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig, res *WorkflowTemplate) (map[string]interface{}, error) {
+ if dcl.IsEmptyValueIndirect(f) {
+ return nil, nil
+ }
+
+ m := make(map[string]interface{})
+ if v := f.DiskType; !dcl.IsEmptyValueIndirect(v) {
+ m["diskType"] = v
+ }
+ if v := f.DiskSizeGb; !dcl.IsEmptyValueIndirect(v) {
+ m["diskSizeGb"] = v
+ }
+ if v := f.ProvisionedIops; !dcl.IsEmptyValueIndirect(v) {
+ m["provisionedIops"] = v
+ }
+ if v := f.ProvisionedThroughput; !dcl.IsEmptyValueIndirect(v) {
+ m["provisionedThroughput"] = v
+ }
+
+ return m, nil
+}
+
+// flattenWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig flattens an instance of WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig from a JSON
+// response object.
+func flattenWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig(c *DclClient, i interface{}, res *WorkflowTemplate) *WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig {
+ m, ok := i.(map[string]interface{})
+ if !ok {
+ return nil
+ }
+
+ r := &WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig{}
+
+ if dcl.IsEmptyValueIndirect(i) {
+ return EmptyWorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfigAttachedDiskConfig
+ }
+ r.DiskType = dcl.FlattenString(m["diskType"])
+ r.DiskSizeGb = dcl.FlattenInteger(m["diskSizeGb"])
+ r.ProvisionedIops = dcl.FlattenInteger(m["provisionedIops"])
+ r.ProvisionedThroughput = dcl.FlattenInteger(m["provisionedThroughput"])
return r
}
@@ -14555,6 +15423,20 @@ func expandWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfig(c
if v := f.NumLocalSsds; !dcl.IsEmptyValueIndirect(v) {
m["numLocalSsds"] = v
}
+ if v := f.BootDiskProvisionedIops; !dcl.IsEmptyValueIndirect(v) {
+ m["bootDiskProvisionedIops"] = v
+ }
+ if v := f.BootDiskProvisionedThroughput; !dcl.IsEmptyValueIndirect(v) {
+ m["bootDiskProvisionedThroughput"] = v
+ }
+ if v := f.LocalSsdInterface; !dcl.IsEmptyValueIndirect(v) {
+ m["localSsdInterface"] = v
+ }
+ if v, err := expandWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigSlice(c, f.AttachedDiskConfig, res); err != nil {
+ return nil, err
+ } else if v != nil {
+ m["attachedDiskConfigs"] = v
+ }
return m, nil
}
@@ -14575,6 +15457,140 @@ func flattenWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfig(
r.BootDiskType = dcl.FlattenString(m["bootDiskType"])
r.BootDiskSizeGb = dcl.FlattenInteger(m["bootDiskSizeGb"])
r.NumLocalSsds = dcl.FlattenInteger(m["numLocalSsds"])
+ r.BootDiskProvisionedIops = dcl.FlattenInteger(m["bootDiskProvisionedIops"])
+ r.BootDiskProvisionedThroughput = dcl.FlattenInteger(m["bootDiskProvisionedThroughput"])
+ r.LocalSsdInterface = dcl.FlattenString(m["localSsdInterface"])
+ attachedDiskConfigs := m["attachedDiskConfigs"]
+ if attachedDiskConfigs == nil {
+ attachedDiskConfigs = m["attachedDiskConfig"]
+ }
+ r.AttachedDiskConfig = flattenWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigSlice(c, attachedDiskConfigs, res)
+
+ return r
+}
+
+// expandWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigMap expands the contents of WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig into a JSON
+// request object.
+func expandWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigMap(c *DclClient, f map[string]WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig, res *WorkflowTemplate) (map[string]interface{}, error) {
+ if f == nil {
+ return nil, nil
+ }
+
+ items := make(map[string]interface{})
+ for k, item := range f {
+ i, err := expandWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(c, &item, res)
+ if err != nil {
+ return nil, err
+ }
+ if i != nil {
+ items[k] = i
+ }
+ }
+
+ return items, nil
+}
+
+// expandWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigSlice expands the contents of WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig into a JSON
+// request object.
+func expandWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigSlice(c *DclClient, f []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig, res *WorkflowTemplate) ([]map[string]interface{}, error) {
+ if f == nil {
+ return nil, nil
+ }
+
+ items := []map[string]interface{}{}
+ for _, item := range f {
+ i, err := expandWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(c, &item, res)
+ if err != nil {
+ return nil, err
+ }
+
+ items = append(items, i)
+ }
+
+ return items, nil
+}
+
+// flattenWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigMap flattens the contents of WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig from a JSON
+// response object.
+func flattenWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigMap(c *DclClient, i interface{}, res *WorkflowTemplate) map[string]WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig {
+ a, ok := i.(map[string]interface{})
+ if !ok {
+ return map[string]WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig{}
+ }
+
+ if len(a) == 0 {
+ return map[string]WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig{}
+ }
+
+ items := make(map[string]WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig)
+ for k, item := range a {
+ items[k] = *flattenWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(c, item.(map[string]interface{}), res)
+ }
+
+ return items
+}
+
+// flattenWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigSlice flattens the contents of WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig from a JSON
+// response object.
+func flattenWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfigSlice(c *DclClient, i interface{}, res *WorkflowTemplate) []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig {
+ a, ok := i.([]interface{})
+ if !ok {
+ return []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig{}
+ }
+
+ if len(a) == 0 {
+ return []WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig{}
+ }
+
+ items := make([]WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig, 0, len(a))
+ for _, item := range a {
+ items = append(items, *flattenWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(c, item.(map[string]interface{}), res))
+ }
+
+ return items
+}
+
+// expandWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig expands an instance of WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig into a JSON
+// request object.
+func expandWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(c *DclClient, f *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig, res *WorkflowTemplate) (map[string]interface{}, error) {
+ if dcl.IsEmptyValueIndirect(f) {
+ return nil, nil
+ }
+
+ m := make(map[string]interface{})
+ if v := f.DiskType; !dcl.IsEmptyValueIndirect(v) {
+ m["diskType"] = v
+ }
+ if v := f.DiskSizeGb; !dcl.IsEmptyValueIndirect(v) {
+ m["diskSizeGb"] = v
+ }
+ if v := f.ProvisionedIops; !dcl.IsEmptyValueIndirect(v) {
+ m["provisionedIops"] = v
+ }
+ if v := f.ProvisionedThroughput; !dcl.IsEmptyValueIndirect(v) {
+ m["provisionedThroughput"] = v
+ }
+
+ return m, nil
+}
+
+// flattenWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig flattens an instance of WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig from a JSON
+// response object.
+func flattenWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig(c *DclClient, i interface{}, res *WorkflowTemplate) *WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig {
+ m, ok := i.(map[string]interface{})
+ if !ok {
+ return nil
+ }
+
+ r := &WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig{}
+
+ if dcl.IsEmptyValueIndirect(i) {
+ return EmptyWorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfigAttachedDiskConfig
+ }
+ r.DiskType = dcl.FlattenString(m["diskType"])
+ r.DiskSizeGb = dcl.FlattenInteger(m["diskSizeGb"])
+ r.ProvisionedIops = dcl.FlattenInteger(m["provisionedIops"])
+ r.ProvisionedThroughput = dcl.FlattenInteger(m["provisionedThroughput"])
return r
}
@@ -15280,6 +16296,20 @@ func expandWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDis
if v := f.NumLocalSsds; !dcl.IsEmptyValueIndirect(v) {
m["numLocalSsds"] = v
}
+ if v := f.BootDiskProvisionedIops; !dcl.IsEmptyValueIndirect(v) {
+ m["bootDiskProvisionedIops"] = v
+ }
+ if v := f.BootDiskProvisionedThroughput; !dcl.IsEmptyValueIndirect(v) {
+ m["bootDiskProvisionedThroughput"] = v
+ }
+ if v := f.LocalSsdInterface; !dcl.IsEmptyValueIndirect(v) {
+ m["localSsdInterface"] = v
+ }
+ if v, err := expandWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigSlice(c, f.AttachedDiskConfig, res); err != nil {
+ return nil, err
+ } else if v != nil {
+ m["attachedDiskConfigs"] = v
+ }
return m, nil
}
@@ -15300,6 +16330,140 @@ func flattenWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDi
r.BootDiskType = dcl.FlattenString(m["bootDiskType"])
r.BootDiskSizeGb = dcl.FlattenInteger(m["bootDiskSizeGb"])
r.NumLocalSsds = dcl.FlattenInteger(m["numLocalSsds"])
+ r.BootDiskProvisionedIops = dcl.FlattenInteger(m["bootDiskProvisionedIops"])
+ r.BootDiskProvisionedThroughput = dcl.FlattenInteger(m["bootDiskProvisionedThroughput"])
+ r.LocalSsdInterface = dcl.FlattenString(m["localSsdInterface"])
+ attachedDiskConfigs := m["attachedDiskConfigs"]
+ if attachedDiskConfigs == nil {
+ attachedDiskConfigs = m["attachedDiskConfig"]
+ }
+ r.AttachedDiskConfig = flattenWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigSlice(c, attachedDiskConfigs, res)
+
+ return r
+}
+
+// expandWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigMap expands the contents of WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig into a JSON
+// request object.
+func expandWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigMap(c *DclClient, f map[string]WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig, res *WorkflowTemplate) (map[string]interface{}, error) {
+ if f == nil {
+ return nil, nil
+ }
+
+ items := make(map[string]interface{})
+ for k, item := range f {
+ i, err := expandWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(c, &item, res)
+ if err != nil {
+ return nil, err
+ }
+ if i != nil {
+ items[k] = i
+ }
+ }
+
+ return items, nil
+}
+
+// expandWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigSlice expands the contents of WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig into a JSON
+// request object.
+func expandWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigSlice(c *DclClient, f []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig, res *WorkflowTemplate) ([]map[string]interface{}, error) {
+ if f == nil {
+ return nil, nil
+ }
+
+ items := []map[string]interface{}{}
+ for _, item := range f {
+ i, err := expandWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(c, &item, res)
+ if err != nil {
+ return nil, err
+ }
+
+ items = append(items, i)
+ }
+
+ return items, nil
+}
+
+// flattenWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigMap flattens the contents of WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig from a JSON
+// response object.
+func flattenWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigMap(c *DclClient, i interface{}, res *WorkflowTemplate) map[string]WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig {
+ a, ok := i.(map[string]interface{})
+ if !ok {
+ return map[string]WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig{}
+ }
+
+ if len(a) == 0 {
+ return map[string]WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig{}
+ }
+
+ items := make(map[string]WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig)
+ for k, item := range a {
+ items[k] = *flattenWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(c, item.(map[string]interface{}), res)
+ }
+
+ return items
+}
+
+// flattenWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigSlice flattens the contents of WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig from a JSON
+// response object.
+func flattenWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfigSlice(c *DclClient, i interface{}, res *WorkflowTemplate) []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig {
+ a, ok := i.([]interface{})
+ if !ok {
+ return []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig{}
+ }
+
+ if len(a) == 0 {
+ return []WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig{}
+ }
+
+ items := make([]WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig, 0, len(a))
+ for _, item := range a {
+ items = append(items, *flattenWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(c, item.(map[string]interface{}), res))
+ }
+
+ return items
+}
+
+// expandWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig expands an instance of WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig into a JSON
+// request object.
+func expandWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(c *DclClient, f *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig, res *WorkflowTemplate) (map[string]interface{}, error) {
+ if dcl.IsEmptyValueIndirect(f) {
+ return nil, nil
+ }
+
+ m := make(map[string]interface{})
+ if v := f.DiskType; !dcl.IsEmptyValueIndirect(v) {
+ m["diskType"] = v
+ }
+ if v := f.DiskSizeGb; !dcl.IsEmptyValueIndirect(v) {
+ m["diskSizeGb"] = v
+ }
+ if v := f.ProvisionedIops; !dcl.IsEmptyValueIndirect(v) {
+ m["provisionedIops"] = v
+ }
+ if v := f.ProvisionedThroughput; !dcl.IsEmptyValueIndirect(v) {
+ m["provisionedThroughput"] = v
+ }
+
+ return m, nil
+}
+
+// flattenWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig flattens an instance of WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig from a JSON
+// response object.
+func flattenWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig(c *DclClient, i interface{}, res *WorkflowTemplate) *WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig {
+ m, ok := i.(map[string]interface{})
+ if !ok {
+ return nil
+ }
+
+ r := &WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig{}
+
+ if dcl.IsEmptyValueIndirect(i) {
+ return EmptyWorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfigAttachedDiskConfig
+ }
+ r.DiskType = dcl.FlattenString(m["diskType"])
+ r.DiskSizeGb = dcl.FlattenInteger(m["diskSizeGb"])
+ r.ProvisionedIops = dcl.FlattenInteger(m["provisionedIops"])
+ r.ProvisionedThroughput = dcl.FlattenInteger(m["provisionedThroughput"])
return r
}
diff --git a/mmv1/third_party/terraform/website/docs/r/dataproc_workflow_template.html.markdown b/mmv1/third_party/terraform/website/docs/r/dataproc_workflow_template.html.markdown
index a6096f1c1698..ab5c065ff6a9 100644
--- a/mmv1/third_party/terraform/website/docs/r/dataproc_workflow_template.html.markdown
+++ b/mmv1/third_party/terraform/website/docs/r/dataproc_workflow_template.html.markdown
@@ -193,7 +193,8 @@ The following arguments are supported:
(Required) The resource name of the workflow template, as described in https://docs.cloud.google.com/apis/design/resource_names. * For `projects.regions.workflowTemplates`, the resource name of the template has the following format: `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` * For `projects.locations.workflowTemplates`, the resource name of the template has the following format: `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
* `placement` -
- (Required) WorkflowTemplate scheduling information. Structure is [documented below](#nested_placement).
+ (Required)
+ WorkflowTemplate scheduling information. Structure is [documented below](#nested_placement).
* `jobs` -
(Required) The Directed Acyclic Graph of Jobs to submit. Structure is [documented below](#nested_jobs)
@@ -755,11 +756,11 @@ The `values` block supports:
* `accelerators` -
(Optional)
- The Compute Engine accelerator configuration for these instances.
+ The Compute Engine accelerator configuration for these instances. Structure is [documented below](#nested_accelerators).
* `disk_config` -
(Optional)
- Disk option config settings.
+ Disk option config settings. Structure is [documented below](#nested_disk_config).
* `image` -
(Optional)
@@ -894,11 +895,45 @@ The `values` block supports:
* `boot_disk_type` -
(Optional)
- Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive).
+ Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive), "pd-standard" (Persistent Disk Hard Disk Drive), or "hyperdisk-balanced".
* `num_local_ssds` -
(Optional)
- Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.
+ Number of attached SSDs, from 0 to 8 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.
+
+* `boot_disk_provisioned_iops` -
+ (Optional)
+ Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be greater than or equal to 3000. Supported only if `boot_disk_type` is `hyperdisk-balanced`.
+
+* `boot_disk_provisioned_throughput` -
+ (Optional)
+ Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle. Values must be greater than or equal to 140. Supported only if `boot_disk_type` is `hyperdisk-balanced`.
+
+* `local_ssd_interface` -
+ (Optional)
+ Interface type of local SSDs (default is "scsi"). Valid values: "scsi" (Small Computer System Interface), "nvme" (Non-Volatile Memory Express).
+
+* `attached_disk_config` -
+ (Optional)
+ Optional. Attached disk configuration. Structure is [documented below](#nested_attached_disk_config).
+
+The `attached_disk_config` block supports:
+
+* `disk_size_gb` -
+ (Optional)
+ Size of the attached disk, specified in GB.
+
+* `disk_type` -
+ (Optional)
+ The disk type of the attached disk. Currently only supports Hyperdisks: `hyperdisk-balanced`, `hyperdisk-extreme`, `hyperdisk-ml`, `hyperdisk-throughput`.
+
+* `provisioned_iops` -
+ (Optional)
+ Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle.
+
+* `provisioned_throughput` -
+ (Optional)
+ Indicates how much throughput to provision for the disk. This sets the number of throughput mb per second that the disk can handle.
The `instance_flexibility_policy` block supports: