-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: (Option to) Shutdown server gracefully when destroyed before deleting it #751
Comments
In general this sounds like a nice option to have! One issue I can think of (see hetznercloud/cli#489) is that "graceful shutdown" is not implemented directly in the API. There are two endpoints which do this:
|
Polling would probably be the more desirable solution, maybe with a configurable timeout with a sensible default. But a hard timeout after which the server is deleted would also be better than no solution. I would be happy to try an implementation for the polling solution. |
That would be awesome! Feel free to open a draft PR if you have any questions :) |
Should it be the new default behaviour (meaning we do not believe / support users relying on the server being insta-nuked on destruction)? Or should it be an opt-in option? |
I would make it an opt-in behaviour, as it differs from the standard behaviour of the API and other tools |
@apricote draft PR open |
What whould you like to see?
Currently, when destroying an
hcloud_server
resource, the server is outright deleted via the API (happening here I think) without shutting it down properly.This causes services that might want to terminate gracefully to not have the chance to do so. It would be nice if it was possible to shut down the server properly before deleting it - maybe via an option in the resource if that change would be considered breaking otherwise.
I would be happy to attempt an implementation if this is something the team would approve.
The text was updated successfully, but these errors were encountered: