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
-`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) Whether the workspace is a prebuild.
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.
73
73
-`name` (String) Name of the workspace.
74
-
-`prebuild_count` (Number) A computed count, equal to 1 if the workspace was prebuilt.
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.
75
75
-`start_count` (Number) A computed count based on `transition` state. If `start`, count will equal 1.
76
76
-`template_id` (String) ID of the workspace's template.
77
77
-`template_name` (String) Name of the workspace's template.
Copy file name to clipboardExpand all lines: docs/data-sources/workspace_preset.md
+7-7
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,20 +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.
39
38
40
39
### Optional
41
40
42
-
-`prebuilds` (Block Set, Max: 1) Prebuilds of the workspace preset. (see [below for nested schema](#nestedblock--prebuilds))
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))
43
43
44
44
### Read-Only
45
45
46
-
-`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
47
48
48
<aid="nestedblock--prebuilds"></a>
49
49
### Nested Schema for `prebuilds`
50
50
51
51
Required:
52
52
53
-
-`instances` (Number)
53
+
-`instances` (Number) The number of workspaces to keep in reserve for this preset.
Description: "A computed count, equal to 1 if the workspace was prebuilt.",
97
+
Description: "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.",
Description: "Whether the workspace is a prebuild.",
117
+
Description: "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.",
Description: "Use this data source to predefine common configurations for workspaces.",
26
+
Description: "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.",
Description: "The preset ID is automatically generated and may change between runs. It is recommended to use the `name` attribute to identify the preset.",
56
56
Computed: true,
57
57
},
58
58
"name": {
59
59
Type: schema.TypeString,
60
-
Description: "Name of the workspace preset.",
60
+
Description: "The name of the workspace preset.",
61
61
Required: true,
62
62
ValidateFunc: validation.StringIsNotEmpty,
63
63
},
64
64
"parameters": {
65
65
Type: schema.TypeMap,
66
-
Description: "Parameters of the workspace preset.",
66
+
Description: "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.",
Description: "Prebuilds of the workspace preset.",
76
+
Description: "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.",
77
77
Optional: true,
78
78
MaxItems: 1,
79
79
Elem: &schema.Resource{
80
80
Schema: map[string]*schema.Schema{
81
81
"instances": {
82
82
Type: schema.TypeInt,
83
+
Description: "The number of workspaces to keep in reserve for this preset.",
0 commit comments