diff --git a/.changelog/6512.txt b/.changelog/6512.txt new file mode 100644 index 0000000000..9f5c42eea2 --- /dev/null +++ b/.changelog/6512.txt @@ -0,0 +1,3 @@ +```release-note:bug +notebooks: fixed perma-diff in `google_notebooks_instance` +``` diff --git a/google-beta/resource_notebooks_instance.go b/google-beta/resource_notebooks_instance.go index 5498db3c0f..a6c115b094 100644 --- a/google-beta/resource_notebooks_instance.go +++ b/google-beta/resource_notebooks_instance.go @@ -162,12 +162,11 @@ You can choose the size of the data disk based on how big your notebooks and dat If not specified, this defaults to 100.`, }, "data_disk_type": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateEnum([]string{"DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD", "PD_BALANCED", "PD_EXTREME", ""}), - DiffSuppressFunc: emptyOrDefaultStringSuppress("DISK_TYPE_UNSPECIFIED"), - Description: `Possible disk types for notebook instances. Possible values: ["DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD", "PD_BALANCED", "PD_EXTREME"]`, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateEnum([]string{"DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD", "PD_BALANCED", "PD_EXTREME", ""}), + Description: `Possible disk types for notebook instances. Possible values: ["DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD", "PD_BALANCED", "PD_EXTREME"]`, }, "disk_encryption": { Type: schema.TypeString, @@ -738,9 +737,6 @@ func resourceNotebooksInstanceRead(d *schema.ResourceData, meta interface{}) err if err := d.Set("custom_gpu_driver_path", flattenNotebooksInstanceCustomGpuDriverPath(res["customGpuDriverPath"], d, config)); err != nil { return fmt.Errorf("Error reading Instance: %s", err) } - if err := d.Set("data_disk_type", flattenNotebooksInstanceDataDiskType(res["dataDiskType"], d, config)); err != nil { - return fmt.Errorf("Error reading Instance: %s", err) - } if err := d.Set("disk_encryption", flattenNotebooksInstanceDiskEncryption(res["diskEncryption"], d, config)); err != nil { return fmt.Errorf("Error reading Instance: %s", err) } @@ -1030,10 +1026,6 @@ func flattenNotebooksInstanceCustomGpuDriverPath(v interface{}, d *schema.Resour return v } -func flattenNotebooksInstanceDataDiskType(v interface{}, d *schema.ResourceData, config *Config) interface{} { - return v -} - func flattenNotebooksInstanceDiskEncryption(v interface{}, d *schema.ResourceData, config *Config) interface{} { return v } diff --git a/google-beta/resource_notebooks_instance_generated_test.go b/google-beta/resource_notebooks_instance_generated_test.go index 40361c54ce..ab223059bc 100644 --- a/google-beta/resource_notebooks_instance_generated_test.go +++ b/google-beta/resource_notebooks_instance_generated_test.go @@ -42,7 +42,7 @@ func TestAccNotebooksInstance_notebookInstanceBasicExample(t *testing.T) { ResourceName: "google_notebooks_instance.instance", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"name", "instance_owners", "boot_disk_type", "boot_disk_size_gb", "data_disk_size_gb", "no_remove_data_disk", "metadata", "vm_image", "container_image", "location"}, + ImportStateVerifyIgnore: []string{"name", "instance_owners", "boot_disk_type", "boot_disk_size_gb", "data_disk_type", "data_disk_size_gb", "no_remove_data_disk", "metadata", "vm_image", "container_image", "location"}, }, }, }) @@ -81,7 +81,7 @@ func TestAccNotebooksInstance_notebookInstanceBasicContainerExample(t *testing.T ResourceName: "google_notebooks_instance.instance", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"name", "instance_owners", "boot_disk_type", "boot_disk_size_gb", "data_disk_size_gb", "no_remove_data_disk", "metadata", "vm_image", "container_image", "location"}, + ImportStateVerifyIgnore: []string{"name", "instance_owners", "boot_disk_type", "boot_disk_size_gb", "data_disk_type", "data_disk_size_gb", "no_remove_data_disk", "metadata", "vm_image", "container_image", "location"}, }, }, }) @@ -124,7 +124,7 @@ func TestAccNotebooksInstance_notebookInstanceBasicGpuExample(t *testing.T) { ResourceName: "google_notebooks_instance.instance", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"name", "instance_owners", "boot_disk_type", "boot_disk_size_gb", "data_disk_size_gb", "no_remove_data_disk", "metadata", "vm_image", "container_image", "location"}, + ImportStateVerifyIgnore: []string{"name", "instance_owners", "boot_disk_type", "boot_disk_size_gb", "data_disk_type", "data_disk_size_gb", "no_remove_data_disk", "metadata", "vm_image", "container_image", "location"}, }, }, }) @@ -170,7 +170,7 @@ func TestAccNotebooksInstance_notebookInstanceFullExample(t *testing.T) { ResourceName: "google_notebooks_instance.instance", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"name", "instance_owners", "boot_disk_type", "boot_disk_size_gb", "data_disk_size_gb", "no_remove_data_disk", "metadata", "vm_image", "container_image", "location"}, + ImportStateVerifyIgnore: []string{"name", "instance_owners", "boot_disk_type", "boot_disk_size_gb", "data_disk_type", "data_disk_size_gb", "no_remove_data_disk", "metadata", "vm_image", "container_image", "location"}, }, }, })