Comments (3)
Maybe list the resource you are deleting (like command output) first and then ask for confirmation?
Add a flag -y (--yes)
to skip asking for confirmation and assume yes.
from cli.
Now that itβs possible to protect resources from accidental deletion on API level, I consider this to no longer be necessary.
from cli.
@thcyron As a fairly new user of hcloud
and the Hetzner cloud, I think this could be reopened. Consider this:
$ hcloud server delete some-server
Even if the server is powered on, the API & CLI will happily delete this server without further notice. I think this is a bit overly zealous. Especially if you have done this previously in the same terminal and just press "Up" arrow and Enter without thinking, it can be quite fatal... π
We could consider doing what Docker Machine does: prompt by default:
$ docker-machine rm foo
About to remove foo
WARNING: This action will delete both local reference and remote instance.
Are you sure? (y/n): ^C
...and if -f
or -y
is specified, remove the machine without further ado:
$ docker-machine rm -f foo
About to remove foo
WARNING: This action will delete both local reference and remote instance.
Error removing host "foo": Docker machine "foo" does not exist. Use "docker-machine ls" to list machines. Use "docker-machine create" to add a new one.
Can't remove "foo"
I think an -f
parameter would make most sense in our case. How about this: if the machine is powered off, no prompting/safety belt, but if the machine is running, ask for confirmation before removal (unless -f
is specified)? π€
from cli.
Related Issues (20)
- [Design Doc] feat: new configuration system + config subcommand
- bug: debug log is truncated if it already exists
- Progress animation is rendered on a new line when the terminal is too small HOT 1
- feat: Limit parallel deletes HOT 1
- SSH options in hcloud server ssh HOT 5
- Deleting protected resources fails quietly HOT 1
- The release v1.44.2 failed. HOT 1
- context command line argument HOT 1
- Store token in a more secure manner , support pairs of tokens HOT 5
- Wording when a firewall is removed from resource is wrong
- fix: allow deleting reverse DNS entries
- issue with creating context in interactive mode (hcloud: context create is an interactive command) HOT 7
- fix: formatting broken when creating server with multiple networks
- Consider merging hcloud-upload-image in this tool HOT 2
- hcloud: invalid gateway (invalid_input, xxxxxx) HOT 2
- macos shows error when running binaries (missing notarization) HOT 1
- Allow not waiting for actions
- hcloud apt install doesnt work HOT 3
- Re-enable linters and improve code quality
- Use consistent base for size unit in server type description HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.