22
33##Overview
44
5- Prebuilt workspaces let you pre-provision and maintain a pool of ready-to-deploy workspaces.
5+ Prebuilt workspaces let you pre-provision and maintain a pool of ready-to-use workspaces.
66Instead of creating a new workspace when a developer requests one, if a workspace matches a preset defined in the
77template parameters, Coder assigns an existing instance, reducing setup time significantly.
88
@@ -30,10 +30,6 @@ template parameters, Coder assigns an existing instance, reducing setup time sig
3030 }
3131```
3232
33- Do not define values for` coder_workspace ` or` coder_workspace_owner ` .
34- These values are[ replaced] ( #resource-replacement ) when the workspace is deployed, and if Coder detects an existing
35- value, it will destroy the prebuilt workspace and create a new one.
36-
37331 . Publish and import the template.
38341 . Coder automatically provisions another prebuilt workspace through an internal reconciliation loop
3935 (similar to Kubernetes) to maintain the number of specified` instances ` .
@@ -49,15 +45,15 @@ You can add the `prebuilds` user to additional groups if you need to.
4945
5046You can view prebuilt workspaces in the** Workspaces** view in the Coder dashboard:
5147
52- ![ A prebuilt workspaceon the dashboard] ( ../../../images/admin/templates/extend-templates/prebuilt/prebuilt-workspaces.png )
48+ ![ A prebuilt workspacein the dashboard] ( ../../../images/admin/templates/extend-templates/prebuilt/prebuilt-workspaces.png )
5349
5450##Claiming
5551
5652A prebuilt workspace is automatically and transparently assigned to a user when a:
5753
5854- User creates a new workspace via the API or the Coder web UI.
5955- User selected a preset which has been configured for prebuilds.
60- - Prebuilt workspace is in eligible state.
56+ - Prebuilt workspace is inan eligible state.
6157
6258The ownership of the prebuilt workspace will change to the requesting user, and this is referred to as a "claim".
6359
@@ -85,7 +81,7 @@ Prebuilt workspaces are not automatically updated after they are created.
8581When a template version changes, all prebuilt workspaces relating to an inactive template version are destroyed.
8682New prebuilt workspaces will be provisioned for the active template version.
8783
88- Youcan invalidate a prebuilt workspace your template version does not change but a referenced dependency does,
84+ Youmay want to invalidate a prebuilt workspace when your template version does not change but a referenced dependency does,
8985which is necessary for running an up-to-date workspace. For example, if
9086an[ AMI] ( https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html ) which is referenced by your template is updated,
9187you can simply delete the prebuilt workspaces, and they will be recreated with the latest AMI.
@@ -140,7 +136,7 @@ eliminating the value of the prior pre-provisioning.
140136Should this occur when a prebuilt workspace is claimed, all Template Admins will receive a notification which will
141137link them to the build logs to investigate which resource was being replaced.
142138
143- ![ Workspace replaced notification.png ] ( ../../../images/admin/templates/extend-templates/prebuilt/replacement-notification.png )
139+ ![ Resource replacement notification] ( ../../../images/admin/templates/extend-templates/prebuilt/replacement-notification.png )
144140
145141To avoid this problem, you will need to add a` lifecycle ` block to your resource:
146142