Open jpbuecken opened 3 weeks ago
hi @jpbuecken, as workaround you can use:
resource "vcd_vm" "instance" {
name = "upgrade-test"
computer_name = "upgrade-test"
vapp_template_id = "urn:vcloud:vapptemplate:d9d38664-be73-4f4c-8da6-42ef78472fb9"
cpus = 2
cpu_cores = 1
memory = 2084
network {
type = "org"
name = "xxxxxxx"
adapter_type = "vmxnet3"
ip_allocation_mode = "POOL"
is_primary = true
}
lifecycle {
ignore_changes = [
# if you don't want VMs to be updated when consolidate_disks_on_create changes (parameter added in 3.12.0)
consolidate_disks_on_create
]
}
}
Terraform Version
Run
terraform -v
to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Expected Behavior
A provider update from 3.11.0 to 3.12.1 should not forces replacement of vcd_vm or vcd_vapp_vm.
Actual Behavior
After update of the provider AND you try to change a value of the vcd_vm (e.g. increase the number of cpus), this forces a replacement of the VM.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform init
terraform apply
sed -i s/3.11.0/3.12.1/g main.tf
terraform init -upgrade
terraform -v
sed -i s/"cpus = 2"/"cpus = 3"/g main.tf
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: -/+ destroy and then create replacement
Terraform will perform the following actions:
vcd_vm.instance must be replaced
-/+ resource "vcd_vm" "instance" {
Important Factoids
VCD Version 10.6.0.1