Skip to content

Commit f5c1e01

Browse files
more notebook instance fixes (#3815) (#2332)
Signed-off-by: Modular Magician <[email protected]>
1 parent fa7664e commit f5c1e01

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

.changelog/3815.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
notebook: fixed bug where not setting `data_disk_type` or `disk_encryption` would cause a diff on the next plan
3+
```

google-beta/resource_notebooks_instance.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,20 @@ You can choose the size of the data disk based on how big your notebooks and dat
146146
If not specified, this defaults to 100.`,
147147
},
148148
"data_disk_type": {
149-
Type: schema.TypeString,
150-
Optional: true,
151-
ForceNew: true,
152-
ValidateFunc: validation.StringInSlice([]string{"DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD", ""}, false),
153-
Description: `Possible disk types for notebook instances. Possible values: ["DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD"]`,
149+
Type: schema.TypeString,
150+
Optional: true,
151+
ForceNew: true,
152+
ValidateFunc: validation.StringInSlice([]string{"DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD", ""}, false),
153+
DiffSuppressFunc: emptyOrDefaultStringSuppress("DISK_TYPE_UNSPECIFIED"),
154+
Description: `Possible disk types for notebook instances. Possible values: ["DISK_TYPE_UNSPECIFIED", "PD_STANDARD", "PD_SSD"]`,
154155
},
155156
"disk_encryption": {
156-
Type: schema.TypeString,
157-
Optional: true,
158-
ForceNew: true,
159-
ValidateFunc: validation.StringInSlice([]string{"DISK_ENCRYPTION_UNSPECIFIED", "GMEK", "CMEK", ""}, false),
160-
Description: `Disk encryption method used on the boot and data disks, defaults to GMEK. Possible values: ["DISK_ENCRYPTION_UNSPECIFIED", "GMEK", "CMEK"]`,
157+
Type: schema.TypeString,
158+
Optional: true,
159+
ForceNew: true,
160+
ValidateFunc: validation.StringInSlice([]string{"DISK_ENCRYPTION_UNSPECIFIED", "GMEK", "CMEK", ""}, false),
161+
DiffSuppressFunc: emptyOrDefaultStringSuppress("DISK_ENCRYPTION_UNSPECIFIED"),
162+
Description: `Disk encryption method used on the boot and data disks, defaults to GMEK. Possible values: ["DISK_ENCRYPTION_UNSPECIFIED", "GMEK", "CMEK"]`,
161163
},
162164
"install_gpu_driver": {
163165
Type: schema.TypeBool,

0 commit comments

Comments
 (0)