Conversation
85c0fac to
fc4e6ea
Compare
fc4e6ea to
96d166e
Compare
|
Does #1342 solve the problem you are trying to solve with this PR? |
|
@jooola not exactly. Actions are only supported on Hashicorp's Terraform, not on OpenTofu, so tofu does currently not have a way to change the power state declaratively. This PR aims to backport some of that into the non-action way of doing so |
|
Hmm, I am not sure this is a good idea. If we are trying to go faster than opentofu, maybe the work effort should be directed towards supporting I'll discuss this addition internally and come back to you. |
|
I don't find it conflicting. IMO actions should be an adition into opentofu, but declarative old-fashioned way is still nice for some use cases. f.ex AWS and Azure can use both ways. Anyway, let me know and I'll maybe work on the opentofu path if I'm available. Thank you! |
|
I am also very interested in this feature. It would allow us to start and stop servers via simple state changes. AWS and Azure already have this. |
|
@nh-exa Please describe your use case in details in #1414 or add a 👍 With regards to this PR, we will not be able to merge this as it is. A lot of work is still needed to support managing the state of the server:
So I am happy to leave this PR open until then, but we will not spend time reviewing this before the above points have not been solved. |
Adds a new
hcloud_server_power_stateSDK resource to manage Hetzner Cloud server power state declaratively through normal plan/apply workflows.This enables OpenTofu-compatible power on/off management without relying on Terraform actions, while keeping the existing action-based resources unchanged. The new resource supports
state = "running"andstate ="off", reports the raw server status, and removes only power-state management on destroy without changing the server.