Closed
Description
In the process of moving from local users to OIDC, I ended up deleting and recreating a user. There were still workspaces attached to the user and I can't find a way to delete them.
When I access the workspace from the main Workspaces section in the UI I get this message -
"user" must be an existing uuid or username.
None of the typical UI items are visible including the delete button.
I tried recreating the username as a local user and now when I try to load the workspace it just redirects me back to the main Workspaces tab.
Is there any way to force delete these workspaces without going through the UI?
Activity
MrPeacockNLB commentedon Jun 6, 2023
Did you try coder delete?
coder delete --orphan true -y WORKSPACE
baxters-ctc commentedon Jun 6, 2023
@MrPeacockNLB Sorry I didn't catch that in the docs earlier. I tried running this and got an unexpected output -
If I run without the workspace arg it prompts but doesn't tell me what it's going to delete -
Any suggestions on how to proceed?
ammario commentedon Jun 6, 2023
@baxters-ctc
--orphan
by itself is all you need, socoder delete --orphan test-afs
. The CLI doesn't know whethertrue
is for the boolean flag or the name of the workspace.baxters-ctc commentedon Jun 6, 2023
@ammario Thanks for following up and clarifying! I'm now running into a slightly different error . If I use just the workspace name, I get a "Resource not found or you do not have access to this resource -
I'm a full admin on the coder instance so I expect I would have access. When I try to give the fully qualified username/workspace I get a different error that seems similar to what's shown the UI -
I was able to delete another workspace from that user's new OIDC account using the same fully qualified username/password format.
coder delete --orphan aldensomayire/terraform-upload
The terraform-upload workspace has been deleted at Jun 6 23:43:06!
Any ideas why it doesn't work for the orphan case?
ammario commentedon Jun 9, 2023
Since this issues appears related to auth perhaps @Emyrk can assist.
10 remaining items