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

details changes are not beeing applied

Open sbrueseke opened this issue 2 years ago • 4 comments

when an instance is using a custom offering and you change cpu and/or memory in details parameter terraform apply shows the change but the instance itself not. Even if instance is shutdown to scale it, it does not work.

Config: resource "cloudstack_instance" "VM1" { name = "TERRAFORMVM1" service_offering = "custom" template = id network_id = id zone = "zone1" expunge = true root_disk_size = 10 details = {"cpuNumber" = "1", "memory" = "1024"} }

Do a terraform apply and the instance will be created with cpu and memory from config. Now edit one or both of them and do a terraform apply again. terraform is showing the changes and says is has been successfully finished, but the instance on CS still has the old values.

sbrueseke avatar Apr 27 '23 09:04 sbrueseke

please reboot the instance and u can see the changes ..

dseralathan avatar Jun 01 '23 16:06 dseralathan

Able to reproduce the issue

i belive this is because the terraform code (resourceCloudStackInstanceUpdate) doesn't have the details parameter

https://github.com/apache/cloudstack-terraform-provider/blob/c8279b9ae5f45f29c16322ad21271e2325ec3d81/cloudstack/resource_cloudstack_instance.go#L488

https://cloudstack.apache.org/api/apidocs-4.19/apis/updateVirtualMachine.html

cc @vishesh92

kiranchavala avatar Mar 05 '24 09:03 kiranchavala

@vishesh92 I'm still having this issue - https://github.com/apache/cloudstack-terraform-provider/issues/148

CodeBleu avatar Dec 10 '24 14:12 CodeBleu

Wondering if this is also related - https://github.com/apache/cloudstack/issues/6865

CodeBleu avatar Dec 10 '24 18:12 CodeBleu