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)
- Filter servers list by status
- feat: Interactive mode for creating resources HOT 1
- ci: update version number string with release please HOT 1
- fix: integer fields are displayed as floats when using `describe` with `o=yaml` HOT 1
- fix: Allow multiple --type flags for metrics commands HOT 1
- New Feature: Unassign/Assign alias IP to server HOT 2
- json output format should NOT output progress HOT 11
- Feature request: define ssh-keys when rebuild a server HOT 2
- Allow adding/removing multiple labels at once
- Introspection: Print associated project HOT 3
- rdns settings not propagated if set using hcloud-cli HOT 1
- mitchellh/gon is unmaintained, consider moving to bearer/gon HOT 2
- FR: move snapshots HOT 1
- Make firewall describe JSON output compatible with firewall create or replace-rules rules-file expected input HOT 1
- firewall --rules-file does not accept firewall/get output HOT 2
- Introduce delete subcommand to `hcloud all` HOT 3
- Add the project name to the hcloud cmd "all" HOT 2
- Improve error message when required argument is not set HOT 2
- Primary IP assignee ID is null in API response but 0 in JSON output HOT 1
- Update Loadbalancer SSL Certificate HOT 4
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.