Closed Ntr0 closed 2 years ago
Nevermind, was using a complete outdated terraform version. /close
Im having the same problem on:
Terraform v1.2.9
on linux_amd64
+ provider registry.terraform.io/ionos-cloud/ionoscloud v6.3.2
When trying to plan or apply onto a created 'ionosccloud_server' resource I cant can't run plan or apply:
Error: volume.0.user_data attribute is immutable, therefore not allowed in update requests
Anyone got a fix to this?
User_data can only be set on server creation. You need to first destroy the server, change user_data
and then run apply. The other option would be for us to change user_data
so that it forces server re-creation on update.
I believe re-creation would be the Terraform native approach.
The problem with the current setup is that it blocks most Terraform actions(plan
, apply
, plan -replace
, plan -destroy
, ...).
Description
Adding a server with specified user-data will make it impossible run terraform apply more than once. To do so, following lifecycle paradigm must be added:
Expected behavior
At least terraform should not break, if user data is used, so at least, the fact that user data is not returned from the cloud api, should lead to ignoring this field, when state is refreshed.
Environment
Terraform version:
Provider version:
OS:
Configuration Files
How to Reproduce
Error and Debug Output
Additional Notes
References