You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a User, I have the use case of deleting all the resources in one project in one go.
Given we don't have projects API available in hcloud-go or project subcommand in hcloud CLI. I think we can implement it under hcloud all
Expected behavior
hcloud all delete
< prompt: Do you really want to delete everything [y/n]?>
The text was updated successfully, but these errors were encountered:
@apricote Do we want to implement it? If yes, I can give it an attempt.
I'm not very familiar with the code here so if you think that this will be not be possible to implement or requires some big refactoring then please let me know.
I'm not sure if it is a good idea to add this to the CLI, as this command is very dangerous and probably not that often used. Also it's not clear what should be deleted. All resources, even the free ones (like SSH Keys, Placement Groups and Firewalls)? Or only paid resources? How are protected resources handled? What about deletion order (Volumes might be attached to servers etc.)? Maybe we can get a third opinion on this.
For now I'd suggest a solution like this:
hcloud server list -o=noheader -o=columns=name | xargs -L1 -I{} hcloud server delete {}
TL;DR
As a User, I have the use case of deleting all the resources in one project in one go.
Given we don't have projects API available in hcloud-go or project subcommand in hcloud CLI. I think we can implement it under
hcloud all
Expected behavior
The text was updated successfully, but these errors were encountered: