Description
Problem
Let's say you had an external provisioner with a specific set of tags running at some point in the past, and you created a number of workspaces using that external provisioner (using coder_workspace_tags
defined in the template).
Let's say that at some point, you decommission that external tagged provisioner and delete whatever compute resources it is running on.
In this situation, you will be unable to delete these workspaces (even with --orphan
), as this creates a workspace build. The workspace tags will always be fetched from the template version, and the resulting provisioner job will fail to be acquired due to the tag mismatch.
Workarounds
- Temporarily run another tagged provisioner and delete the workspaces
- Update the template version to remove the tag requirement, update the workspaces, and delete the workspaces
- Manually remove the rows from the database
Suggested Solution
The --orphan
option should not need to create a provisioner job at all -- based on my understanding of the word "orphan", this means that the expection is that resources may be left running that will be the responsibility of the user to clean up.
If it is clear that no provisioner will be able to delete the workspace, and --orphan
is specified, we could simply skip creating a job entirely and just delete the rows from the database.