Closed zeerayne closed 1 year ago
Guestinfo holds the cloudinit information. Sorry, but I don't agree. If you change cloudinit (ie, guestinfo), then the VM needs to be replaced.
If you do not want your VM's replaced when guestinfo is changed by an external manager (you, or some other tool), then you can use the built-in terraform way of ignoring those changes. (lifecycle mangement, ignore_changes)
https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#ignore_changes
That's true, but for windows guests guestinfo
looks like filled automatically with some useless data after installing vmware-tools in some cases, and after that contains information which wasn't declared in guest vm resource.
terraform doesn't care who changed the information. That fact that it was changed means that it needs to be corrected. In this case userdata is used for cloudinit, so the vm must be replaced.
There is a simple work-around.
Is it possible for you to confirm with certainly which tool created this problem?
Make a lot of tries to stably reproduce this, and this problem stop appearing after installing 2022-10-06 update for ESXi 6.7 and using latest vmware tools version.
Describe the bug
While working with windows guests some guests are planned to be recreated with no actual requirements to do it.
I guess it is windows-specific issuse, but not all windows guests are affected. Even in provided resource group only 2 of 16 guests are affected.
To Reproduce
terraform apply
terraform plan
Expected behavior
Clearly vmtools version information which is contained in
guestinfo
should not cause resource destroy/add. I assume it should be ignored silently.Terraform files
Desktop