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
Copy file name to clipboardExpand all lines: docs/data-sources/parameter.md
+2
Original file line number
Diff line number
Diff line change
@@ -145,10 +145,12 @@ data "coder_parameter" "home_volume_size" {
145
145
-`description` (String) Describe what this parameter does.
146
146
-`display_name` (String) The displayed name of the parameter as it will appear in the interface.
147
147
-`ephemeral` (Boolean) The value of an ephemeral parameter will not be preserved between consecutive workspace builds.
148
+
-`form_type` (String) The type of this parameter. Must be one of: [radio, slider, input, dropdown, checkbox, switch, multi-select, tag-select, textarea, error].
148
149
-`icon` (String) A URL to an icon that will display in the dashboard. View built-in icons [here](https://github.com/coder/coder/tree/main/site/static/icon). Use a built-in icon with `"${data.coder_workspace.me.access_url}/icon/<path>"`.
149
150
-`mutable` (Boolean) Whether this value can be changed after workspace creation. This can be destructive for values like region, so use with caution!
150
151
-`option` (Block List) Each `option` block defines a value for a user to select from. (see [below for nested schema](#nestedblock--option))
151
152
-`order` (Number) The order determines the position of a template parameter in the UI/CLI presentation. The lowest order is shown first and parameters with equal order are sorted by name (ascending order).
153
+
-`styling` (String) JSON encoded string containing the metadata for controlling the appearance of this parameter in the UI. This option is purely cosmetic and does not affect the function of the parameter in terraform.
152
154
-`type` (String) The type of this parameter. Must be one of: `"number"`, `"string"`, `"bool"`, or `"list(string)"`.
153
155
-`validation` (Block List, Max: 1) Validate the input of a parameter. (see [below for nested schema](#nestedblock--validation))
-`access_port` (Number) The access port of the Coder deployment provisioning this workspace.
70
70
-`access_url` (String) The access URL of the Coder deployment provisioning this workspace.
71
71
-`id` (String) UUID of the workspace.
72
+
-`is_prebuild` (Boolean) Similar to `prebuild_count`, but a boolean value instead of a count. This is set to true if the workspace is a currently unassigned prebuild. Once the workspace is assigned, this value will be false.
72
73
-`name` (String) Name of the workspace.
74
+
-`prebuild_count` (Number) A computed count, equal to 1 if the workspace is a currently unassigned prebuild. Use this to conditionally act on the status of a prebuild. Actions that do not require user identity can be taken when this value is set to 1. Actions that should only be taken once the workspace has been assigned to a user may be taken when this value is set to 0.
73
75
-`start_count` (Number) A computed count based on `transition` state. If `start`, count will equal 1.
74
76
-`template_id` (String) ID of the workspace's template.
75
77
-`template_name` (String) Name of the workspace's template.
-`login_type` (String) The type of login the user has.
54
54
-`name` (String) The username of the user.
55
55
-`oidc_access_token` (String) A valid OpenID Connect access token of the workspace owner. This is only available if the workspace owner authenticated with OpenID Connect. If a valid token cannot be obtained, this value will be an empty string.
56
+
-`rbac_roles` (List of Object) The RBAC roles of which the user is assigned. (see [below for nested schema](#nestedatt--rbac_roles))
56
57
-`session_token` (String) Session token for authenticating with a Coder deployment. It is regenerated every time a workspace is started.
57
58
-`ssh_private_key` (String, Sensitive) The user's generated SSH private key.
58
59
-`ssh_public_key` (String) The user's generated SSH public key.
Copy file name to clipboardExpand all lines: docs/data-sources/workspace_preset.md
+16-5
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,12 @@
3
3
page_title: "coder_workspace_preset Data Source - terraform-provider-coder"
4
4
subcategory: ""
5
5
description: |-
6
-
Use this data source to predefine common configurations for workspaces.
6
+
Use this data source to predefine common configurations for coder workspaces. Users will have the option to select a defined preset, which will automatically apply the selected configuration. Any parameters defined in the preset will be applied to the workspace. Parameters that are not defined by the preset will still be configurable when creating a workspace.
7
7
---
8
8
9
9
# coder_workspace_preset (Data Source)
10
10
11
-
Use this data source to predefine common configurations for workspaces.
11
+
Use this data source to predefine common configurations for coder workspaces. Users will have the option to select a defined preset, which will automatically apply the selected configuration. Any parameters defined in the preset will be applied to the workspace. Parameters that are not defined by the preset will still be configurable when creating a workspace.
12
12
13
13
## Example Usage
14
14
@@ -34,9 +34,20 @@ data "coder_workspace_preset" "example" {
34
34
35
35
### Required
36
36
37
-
-`name` (String) Name of the workspace preset.
38
-
-`parameters` (Map of String) Parameters of the workspace preset.
37
+
-`name` (String) The name of the workspace preset.
38
+
39
+
### Optional
40
+
41
+
-`parameters` (Map of String) Workspace parameters that will be set by the workspace preset. For simple templates that only need prebuilds, you may define a preset with zero parameters. Because workspace parameters may change between Coder template versions, preset parameters are allowed to define values for parameters that do not exist in the current template version.
42
+
-`prebuilds` (Block Set, Max: 1) Prebuilt workspace configuration related to this workspace preset. Coder will build and maintain workspaces in reserve based on this configuration. When a user creates a new workspace using a preset, they will be assigned a prebuilt workspace, instead of waiting for a new workspace to build. (see [below for nested schema](#nestedblock--prebuilds))
39
43
40
44
### Read-Only
41
45
42
-
-`id` (String) ID of the workspace preset.
46
+
-`id` (String) The preset ID is automatically generated and may change between runs. It is recommended to use the `name` attribute to identify the preset.
47
+
48
+
<aid="nestedblock--prebuilds"></a>
49
+
### Nested Schema for `prebuilds`
50
+
51
+
Required:
52
+
53
+
-`instances` (Number) The number of workspaces to keep in reserve for this preset.
0 commit comments