When workspaces are deleted with the --orphan
flag, or Workspace provisioning jobs terminate abnormally, unaccounted resources may result. It should be easy to identify and remove unaccounted resources, but the methods to do so depend on the underlying infrastructure deployed by template administrators.
In general, template authors should label resources using whatever metadata is available on their platform of choice. Platform administrators should list all resources that should be managed by coder according to metadata on their platform to the infrastructure that Coder reports to manage. The disjunction of these two lists are unaccounted and should then be removed by the operator using the methods made available by their infrastructure of choice.
We should document an example of this process using a popular platform, like Kubernetes, and trust users to translate this process into their own platforms.