Open mzhaase opened 9 months ago
Hey @mzhaase,
thanks for the report!
Unfortunately this is not possible with the current code. With the Terraform Provider SDKv2, which we currently use to implement most of the resources, we can only mark a field as always or never forcing a replacement. As changing the server type within an architecture is supported, we would like to keep this as is.
We are currently migrating to the new Terraform Provider Plugin Framework (#752), which supports conditionally forcing a replacement. The hcloud_server
resource is planned as one of the next resources to refactor, as we already know of a few bugs that we can finally solve with the new Plugin Framework.
For now, you can manually tell terraform to replace the resource through terraform apply -replace="hcloud_server.worker"
or by tainting the resource and then applying: terraform taint hcloud_server.worker
.
What happened?
Changed the type of a server from an ARM one to an x86 one. Terraform output:
What did you expect to happen?
When changing the server so architectures are switched, the server should probably be recreated instead of updated-in-place.
Please provide a minimal working example
Deploy, then change "cax11" to "cx11"