1
1
# Prebuilt workspaces
2
2
3
- Prebuilt workspaces (Prebuilds) allow template administrators to improve the developer experience by reducing workspace
3
+ Prebuilt workspaces allow template administrators to improve the developer experience by reducing workspace
4
4
creation time with an automatically maintained pool of ready-to-use workspaces for specific parameter presets.
5
5
6
- The template administrator configures a template to be available with prebuilt workspaces, and then when a developer creates
6
+ The template administrator configures a template to provision prebuilt workspaces in the background , and then when a developer creates
7
7
a new workspace with matching parameters, Coder assigns them an existing prebuilt instance.
8
8
Prebuilt workspaces significantly reduce wait times, especially for templates with complex provisioning or lengthy startup procedures.
9
9
10
10
Prebuilt workspaces are:
11
11
12
12
- Created and maintained automatically by Coder to match your specified preset configurations.
13
- - Claimed transparently when developers request matching workspaces.
13
+ - Claimed transparently when developers create workspaces.
14
14
- Monitored and replaced automatically to maintain your desired pool size.
15
15
16
16
## Prerequisites
17
17
18
18
- [ ** Premium license** ] ( ../../licensing/index.md )
19
- - [ ** Template administrator privileges** ] ( ../../users/groups-roles.md )
20
19
- ** Compatible Terraform provider** : Use ` coder/coder ` Terraform provider ` >= 2.3.0-pre2 ` . (** TODO: update with latest version** )
21
20
- ** Feature flag** : Enable the ` workspace-prebuilds ` [ experiment] ( ../../../reference/cli/server.md#--experiments ) .
22
21
@@ -34,7 +33,7 @@ instances your Coder deployment should maintain:
34
33
memory = 16
35
34
}
36
35
prebuilds {
37
- instances = 3 // Number of prebuilt workspaces to maintain
36
+ instances = 3 # Number of prebuilt workspaces to maintain
38
37
}
39
38
}
40
39
```
@@ -67,11 +66,11 @@ Expand each item in this list for more information about the stage:
67
66
68
67
1 . The workspace is provisioned like a regular workspace.
69
68
1 . The workspace reaches ` running ` state.
70
- 1 . The agent connects and reports ` ready ` status .
71
- 1 . All bootstrap procedures and startup scripts complete successfully.
72
- 1 . The workspace is marked as ` eligible ` to be claimed .
69
+ 1 . The agent connects to coderd .
70
+ 1 . The agent starts its bootstrap procedures and startup scripts complete successfully.
71
+ 1 . The agent reports ` ready ` status .
73
72
74
- Prebuilds that fail during provisioning are retried with an exponential backoff to prevent resource waste .
73
+ Prebuilds that fail during provisioning are retried with an exponential backoff to prevent transient failures .
75
74
76
75
</details >
77
76
@@ -112,11 +111,9 @@ Prebuilt workspaces are tightly integrated with [workspace presets](./parameters
112
111
113
112
1 . Each Prebuild is associated with a specific template preset.
114
113
1 . The preset must define all required parameters needed to build the workspace.
115
- 1 . Parameters that are not defined in the preset can still be customized by users when they claim a workspace.
116
114
1 . The preset parameters define the base configuration and are immutable after they're claimed.
117
- 1 . Prebuilds help presets deliver even faster workspace creation .
115
+ 1 . Parameters that are not defined in the preset can still be customized by users when they claim a workspace .
118
116
119
- _ Note: In future releases, we will allow operators to invalidate their prebuilt workspaces programmatically._
120
117
121
118
## Administration and troubleshooting
122
119
@@ -127,15 +124,14 @@ Because unclaimed prebuilt workspaces are owned by the `prebuilds` user, you can
127
124
128
125
1 . Configure quotas for any group that includes this user.
129
126
1 . Set appropriate limits to balance Prebuild availability with resource constraints.
130
- 1 . Monitor quota utilization through Coder's dashboard.
131
127
132
128
If a quota is exceeded, the prebuilt workspace will fail provisioning the same way other workspaces do.
133
129
134
130
### Template configuration best practices
135
131
136
132
#### Preventing resource replacement
137
133
138
- When a prebuilt workspace is claimed, Terraform runs again with new values for the workspace owner and name.
134
+ When a prebuilt workspace is claimed, another ` terraform apply ` run occurs with new values for the workspace owner and name.
139
135
140
136
This can cause issues:
141
137
@@ -214,5 +210,4 @@ These logs provide information about:
214
210
215
211
1 . Creation and deletion attempts for prebuilds.
216
212
1 . Backoff events after failed builds.
217
- 1 . Eligibility state changes.
218
213
1 . Claiming operations.
0 commit comments