You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set supported PD fields on workstation_config as mutable. (#8000) (#5695)
* Set supported PD fields on workstation_config as mutable.
* Revert default for reclaim_policy as it is breaking.
Signed-off-by: Modular Magician <[email protected]>
Copy file name to clipboardExpand all lines: google-beta/resource_workstations_workstation_config.go
+21-14Lines changed: 21 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -273,16 +273,14 @@ A duration in seconds with up to nine fractional digits, ending with 's'. Exampl
273
273
Type: schema.TypeList,
274
274
Computed: true,
275
275
Optional: true,
276
-
ForceNew: true,
277
276
Description: `Directories to persist across workstation sessions.`,
278
277
Elem: &schema.Resource{
279
278
Schema: map[string]*schema.Schema{
280
279
"gce_pd": {
281
280
Type: schema.TypeList,
282
281
Computed: true,
283
282
Optional: true,
284
-
ForceNew: true,
285
-
Description: `PersistentDirectory backed by a Compute Engine regional persistent disk.`,
283
+
Description: `A directory to persist across workstation sessions, backed by a Compute Engine regional persistent disk. Can only be updated if not empty during creation.`,
286
284
MaxItems: 1,
287
285
Elem: &schema.Resource{
288
286
Schema: map[string]*schema.Schema{
@@ -291,34 +289,33 @@ A duration in seconds with up to nine fractional digits, ending with 's'. Exampl
291
289
Computed: true,
292
290
Optional: true,
293
291
ForceNew: true,
294
-
Description: `Type of the disk to use.`,
292
+
Description: `The type of the persistent disk for the home directory. Defaults to 'pd-standard'.`,
295
293
},
296
294
"fs_type": {
297
295
Type: schema.TypeString,
298
296
Computed: true,
299
297
Optional: true,
300
298
ForceNew: true,
301
-
Description: `Type of file system that the disk should be formatted with. The workstation image must support this file system type. Must be empty if sourceSnapshot is set.`,
299
+
Description: `Type of file system that the disk should be formatted with. The workstation image must support this file system type. Must be empty if 'sourceSnapshot' is set. Defaults to 'ext4'.`,
Description: `What should happen to the disk after the workstation is deleted. Defaults to DELETE. Possible values: ["DELETE", "RETAIN"]`,
305
+
Description: `Whether the persistent disk should be deleted when the workstation is deleted. Valid values are 'DELETE' and 'RETAIN'. Defaults to 'DELETE'. Possible values: ["DELETE", "RETAIN"]`,
309
306
},
310
307
"size_gb": {
311
-
Type: schema.TypeInt,
312
-
Computed: true,
313
-
Optional: true,
314
-
ForceNew: true,
315
-
Description: `Size of the disk in GB. Must be empty if sourceSnapshot is set.`,
308
+
Type: schema.TypeInt,
309
+
Computed: true,
310
+
Optional: true,
311
+
ForceNew: true,
312
+
Description: `The GB capacity of a persistent home directory for each workstation created with this configuration. Must be empty if 'sourceSnapshot' is set.
313
+
Valid values are '10', '50', '100', '200', '500', or '1000'. Defaults to '200'. If less than '200' GB, the 'diskType' must be 'pd-balanced' or 'pd-ssd'.`,
316
314
},
317
315
"source_snapshot": {
318
316
Type: schema.TypeString,
319
317
Optional: true,
320
-
ForceNew: true,
321
-
Description: `The snapshot to use as the source for the disk. This can be the snapshot's 'self_link', 'id', or a string in the format of 'projects/{project}/global/snapshots/{snapshot}'. If set, sizeGb and fsType must be empty.`,
318
+
Description: `Name of the snapshot to use as the source for the disk. This can be the snapshot's 'self_link', 'id', or a string in the format of 'projects/{project}/global/snapshots/{snapshot}'. If set, 'sizeGb' and 'fsType' must be empty. Can only be updated if it has an existing value.`,
322
319
},
323
320
},
324
321
},
@@ -674,6 +671,12 @@ func resourceWorkstationsWorkstationConfigUpdate(d *schema.ResourceData, meta in
@@ -560,32 +562,33 @@ The following arguments are supported:
560
562
561
563
*`gce_pd` -
562
564
(Optional)
563
-
PersistentDirectory backed by a Compute Engine regional persistent disk.
565
+
A directory to persist across workstation sessions, backed by a Compute Engine regional persistent disk. Can only be updated if not empty during creation.
Type of file system that the disk should be formatted with. The workstation image must support this file system type. Must be empty if sourceSnapshot is set.
573
+
Type of file system that the disk should be formatted with. The workstation image must support this file system type. Must be empty if `sourceSnapshot` is set. Defaults to `ext4`.
572
574
573
575
*`disk_type` -
574
576
(Optional)
575
-
Type of the disk to use.
577
+
The type of the persistent disk for the home directory. Defaults to `pd-standard`.
576
578
577
579
*`size_gb` -
578
580
(Optional)
579
-
Size of the disk in GB. Must be empty if sourceSnapshot is set.
581
+
The GB capacity of a persistent home directory for each workstation created with this configuration. Must be empty if `sourceSnapshot` is set.
582
+
Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. Defaults to `200`. If less than `200` GB, the `diskType` must be `pd-balanced` or `pd-ssd`.
580
583
581
584
*`reclaim_policy` -
582
585
(Optional)
583
-
What should happen to the disk after the workstation is deleted. Defaults to DELETE.
586
+
Whether the persistent disk should be deleted when the workstation is deleted. Valid values are `DELETE` and `RETAIN`. Defaults to `DELETE`.
584
587
Possible values are: `DELETE`, `RETAIN`.
585
588
586
589
*`source_snapshot` -
587
590
(Optional)
588
-
The snapshot to use as the source for the disk. This can be the snapshot's `self_link`, `id`, or a string in the format of `projects/{project}/global/snapshots/{snapshot}`. If set, sizeGb and fsType must be empty.
591
+
Name of the snapshot to use as the source for the disk. This can be the snapshot's `self_link`, `id`, or a string in the format of `projects/{project}/global/snapshots/{snapshot}`. If set, `sizeGb` and `fsType` must be empty. Can only be updated if it has an existing value.
0 commit comments