terraform-provider-hcloud icon indicating copy to clipboard operation
terraform-provider-hcloud copied to clipboard

[Feature]: Allow automatic unmounting of iso images on reboot

Open phaer opened this issue 2 years ago • 1 comments

What whould you like to see?

Hello,

Thanks for this provider! I am using the iso attribute of hcloud_server to boot new servers with a NixOS iso provided by hetzner, which is useful to install NixOS to the servers harddisk.

The issue is that this setting seems to survive reboots; the server boots the iso image not only on first boot but on its second boot as well. This is in contrast to rescue which applies to the first boot only.

My suggestion would be to either change the behavior of iso, or - to avoid a breaking change - introduce a new attribute, named e.g., detach_iso to enable users to specify an ISO image for first boot only.

phaer avatar Apr 02 '22 20:04 phaer

If I read the source correctly, the way rescue works is that it's activated in this provider, but deactivation seems to happen implicitly on the other side of the API - so this terraform provider might be the wrong place for this feature request?

phaer avatar Apr 02 '22 21:04 phaer

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

github-actions[bot] avatar Oct 11 '23 12:10 github-actions[bot]

The terraform way-of-life does not really work well with this, your terraform configuration describes the "desired state of the world". So it can either be attached or detached. This would only be possible if all the setup happens within the provider code.

One-boot Rescue Mode is implemented in the API:

Rescue Mode is automatically disabled when you first boot into it or if you do not use it for 60 minutes.

apricote avatar Oct 12 '23 08:10 apricote