cycloid-cli icon indicating copy to clipboard operation
cycloid-cli copied to clipboard

org: implement a force delete

Open gaelL opened this issue 4 years ago • 3 comments

Currently when you delete an org, the org have to be empty (no project created)

Maybe we could provide a --force-delete flag in the cli to also delete project inside the org

gaelL avatar Nov 09 '20 10:11 gaelL

@gaelL should not be done on the API side ?

tormath1 avatar Nov 23 '20 15:11 tormath1

We have thought several times about this, having this ?force=true on the API but I think it's "not" a good behavior for an API. We have the restriction because deleting Projects is "sensible" so it's better to be handled for the user for example.

Would make sense for the CLI to follow the same behavior, maybe with a helper (displaying the current Projects) or something but that's up to you :).

xescugc avatar Nov 23 '20 17:11 xescugc

thanks @xescugc for the update on this point. :)

in this case, we could have something like:

$ cy org delete --org my-org
org is not empty, please delete your projects or use --force
$ cy org delete --org my-org --force
org and X projects, are going to be deleted. Proceed ? [Y/n]

tormath1 avatar Nov 23 '20 18:11 tormath1