feat: add is_prebuild_claim to distinguish post-claim provisioning - #17757
Conversation
Signed-off-by: Danny Kopping <[email protected]>
Signed-off-by: Danny Kopping <[email protected]>
spikecurtis
left a comment
There was a problem hiding this comment.
I've suggested a different name for the field, but I don't need to review again.
| string running_workspace_agent_token = 21; | ||
| bool is_prebuild = 20; // Indicates that a prebuilt workspace is being built. | ||
| string running_workspace_agent_token = 21; // Preserves the running agent token of a prebuilt workspace so it can reinitialize. | ||
| bool is_prebuild_claim = 22; // Indicates that a prebuilt workspace is being claimed. |
There was a problem hiding this comment.
| bool is_prebuild_claim = 22; // Indicates that a prebuilt workspace is being claimed. | |
| bool claims_prebuilt_workspace = 22; // Indicates that a prebuilt workspace is being claimed. |
There was a problem hiding this comment.
You're right; I probably shouldn't refer to "prebuild" here.
I'll make it is_prebuilt_workspace_claim to be similar in form to is_prebuild, since they're related fields.
There was a problem hiding this comment.
You could make them a single enum...
There was a problem hiding this comment.
Could work, lemme try it and see how it feels.
There was a problem hiding this comment.
@spikecurtis great suggestion, this is more in line with how we do other things like workspace transitions; should've done this from the beginning.
Signed-off-by: Danny Kopping <[email protected]>
Signed-off-by: Danny Kopping <[email protected]>
Signed-off-by: Danny Kopping <[email protected]>
Used in combination with coder/terraform-provider-coder#396
This is required by both #17475 and #17571
Operators may need to conditionalize their templates to perform certain operations once a prebuilt workspace has been claimed. This value will only be set once a claim takes place and a subsequent
terraform applyoccurs. Anyterraform applyruns thereafter will be indistinguishable from a normal run on a workspace.