Skip to content

Commit

Permalink
Add ephemeral_directories to google_workstations_workstation_config (
Browse files Browse the repository at this point in the history
…#10042) (#17515)

* Add `ephemeral_directories` to google_workstations_workstation_config

* Remove trailing spaces

* Add a test for ephemeral_directories

* Fix test

* Add a test for source_image

* Fix typo in test

* Remove unnecessary immutable field

[upstream:7d69486c5abeca313d2ce35ae053b073e34ca03a]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician committed Mar 7, 2024
1 parent aa0728e commit c91038b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/10042.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
workstations: added support for `ephemeral_directories` in `google_workstations_workstation_config`
```
40 changes: 40 additions & 0 deletions website/docs/r/workstations_workstation_config.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,11 @@ The following arguments are supported:
Directories to persist across workstation sessions.
Structure is [documented below](#nested_persistent_directories).

* `ephemeral_directories` -
(Optional)
Ephemeral directories which won't persist across workstation sessions.
Structure is [documented below](#nested_ephemeral_directories).

* `container` -
(Optional)
Container that will be run for each workstation using this configuration when that workstation is started.
Expand Down Expand Up @@ -716,6 +721,41 @@ The following arguments are supported:
(Optional)
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.

<a name="nested_ephemeral_directories"></a>The `ephemeral_directories` block supports:

* `mount_path` -
(Optional)
Location of this directory in the running workstation.

* `gce_pd` -
(Optional)
An EphemeralDirectory backed by a Compute Engine persistent disk.
Structure is [documented below](#nested_gce_pd).


<a name="nested_gce_pd"></a>The `gce_pd` block supports:

* `disk_type` -
(Optional)
Type of the disk to use. Defaults to `"pd-standard"`.

* `source_snapshot` -
(Optional)
Name of the snapshot to use as the source for the disk.
Must be empty if `sourceImage` is set.
Must be empty if `read_only` is false.
Updating `source_snapshot` will update content in the ephemeral directory after the workstation is restarted.

* `source_image` -
(Optional)
Name of the disk image to use as the source for the disk.
Must be empty `sourceSnapshot` is set.
Updating `sourceImage` will update content in the ephemeral directory after the workstation is restarted.

* `read_only` -
(Optional)
Whether the disk is read only. If true, the disk may be shared by multiple VMs and `sourceSnapshot` must be set.

<a name="nested_container"></a>The `container` block supports:

* `image` -
Expand Down

0 comments on commit c91038b

Please sign in to comment.