This is the next phase of the work started in the ticket #6.
As a user I want to update the cpu and ram properties without destroying my VM. I don't want the terraform provider to explicitly know that the VM will be stopped before and started after I update these properties (see comment). I will delegate that operation to the SDK.
Solution:
1) Add a dedicated resize method to the SDK
a) Save the current runstate to a variable
b) This method stops a running VM
c) waits until it is stopped
d) saves the cpu and ram changes
e) restores the VM runstate to what it was before
2) Remove the Force New fields from the resources cpus and ram fields
3) call the SDK resize method from the provider in the resource update method
This is the next phase of the work started in the ticket #6. As a user I want to update the cpu and ram properties without destroying my VM. I don't want the terraform provider to explicitly know that the VM will be stopped before and started after I update these properties (see comment). I will delegate that operation to the SDK.
Solution: 1) Add a dedicated resize method to the SDK a) Save the current runstate to a variable b) This method stops a running VM c) waits until it is stopped d) saves the cpu and ram changes e) restores the VM runstate to what it was before 2) Remove the Force New fields from the resources
cpus
andram
fields 3) call the SDK resize method from the provider in the resource update method