-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Requested by customer on ticket 4943.
Description
Currently, the CLI supports creating organizations via coder organizations create, but there is no corresponding coder organizations delete command. The API endpoint already exists (DELETE /organizations/{organization}) and is available in the UI, but CLI users cannot delete organizations.
Current State
The coder organizations command currently supports these subcommands:
show- Show organization detailscreate- Create a new organizationmembers- Manage organization membersroles- Manage organization rolessettings- Manage organization settings
Proposed Solution
Add a coder organizations delete <organization_name> command that:
- Accepts organization name or ID as an argument
- Prevents deletion of the default organization (matching API behavior)
- Includes a confirmation prompt (with
--yesflag to skip) - Provides clear error messages when the organization cannot be deleted due to existing resources (workspaces, templates, members, groups, provisioner keys)
Example Usage
# Delete with confirmation prompt
coder organizations delete my-org
# Delete without confirmation
coder organizations delete my-org --yesReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels