feat: Support state in ionoscloud_server to set the power state
hegerdes opened this issue · 6 comments
hegerdes commented
Current Provider Version
terraform {
required_version = ">= 1.4.0"
required_providers {
ionoscloud = {
source = "ionos-cloud/ionoscloud"
version = "6.4.1"
}
random = {
source = "hashicorp/random"
version = "3.5.1"
}
}
}
Use-cases
It would be awesome to support the ionos_server_state
prob to stop severs via terraform. The ansibe-modules support a state
prob to set for each server. As far as I know there are the following states in the DCD:
- running
- shutdown
- reset
This could also be used to reboot a server without having to connect to the server.
Attempted Solutions
Currently this is not supported in this provider. You have to extract the server id form the state (or output the ids to a file) and make a extra api request in an arbitrary language
Proposal
Support the state prob in the ionoscloud_server
References
cristiGuranIonos commented
Thanks for raising this. We'll take a look at it.
cbeti-ionos commented
Support for modifying the power state for servers through the vm_state
field should be available in the next release.
hegerdes commented
Nice to hear! Are all three states (running, stopped, reset) supported?