2
2
3
3
##Overview
4
4
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.
6
6
Instead of creating a new workspace when a developer requests one, if a workspace matches a preset defined in the
7
7
template parameters, Coder assigns an existing instance, reducing setup time significantly.
8
8
@@ -30,10 +30,6 @@ template parameters, Coder assigns an existing instance, reducing setup time sig
30
30
}
31
31
```
32
32
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
-
37
33
1 . Publish and import the template.
38
34
1 . Coder automatically provisions another prebuilt workspace through an internal reconciliation loop
39
35
(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.
49
45
50
46
You can view prebuilt workspaces in the** Workspaces** view in the Coder dashboard:
51
47
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 )
53
49
54
50
##Claiming
55
51
56
52
A prebuilt workspace is automatically and transparently assigned to a user when a:
57
53
58
54
- User creates a new workspace via the API or the Coder web UI.
59
55
- User selected a preset which has been configured for prebuilds.
60
- - Prebuilt workspace is in eligible state.
56
+ - Prebuilt workspace is inan eligible state.
61
57
62
58
The ownership of the prebuilt workspace will change to the requesting user, and this is referred to as a "claim".
63
59
@@ -85,7 +81,7 @@ Prebuilt workspaces are not automatically updated after they are created.
85
81
When a template version changes, all prebuilt workspaces relating to an inactive template version are destroyed.
86
82
New prebuilt workspaces will be provisioned for the active template version.
87
83
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,
89
85
which is necessary for running an up-to-date workspace. For example, if
90
86
an[ AMI] ( https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html ) which is referenced by your template is updated,
91
87
you 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.
140
136
Should this occur when a prebuilt workspace is claimed, all Template Admins will receive a notification which will
141
137
link them to the build logs to investigate which resource was being replaced.
142
138
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 )
144
140
145
141
To avoid this problem, you will need to add a` lifecycle ` block to your resource:
146
142