-
Notifications
You must be signed in to change notification settings - Fork 476
Open
Labels
Milestone
Description
Code of Conduct
- I have read and agree to the Code of Conduct.
- Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
- Do not leave "+1" or other comments that do not add relevant information or questions.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Terraform
1.3.8
Terraform Provider
2.15.0
VMware vSphere
8.0.3
Description
When I attempt to set the vApp properties to blank, nothing happens. The diff always comes as it going to set the blank, but it doesn't actually do it.
Affected Resources or Data Sources
resource/vsphere_virtual_machine
Terraform Configuration
resource "vsphere_virtual_machine" "vm" {
name = "test-vm"
datacenter_id = data.vsphere_datacenter.datacenter.id
datastore_id = data.vsphere_datastore.datastore.id
resource_pool_id = data.vsphere_resource_pool.default.id
host_system_id = tolist(data.vsphere_compute_cluster_host_group.host_group.host_system_ids)[0]
num_cpus = 2
num_cores_per_socket = 2
memory = 2048
wait_for_guest_net_timeout = 5
wait_for_guest_ip_timeout = 5
lifecycle {
ignore_changes = [ datastore_id, host_system_id ]
}
cdrom {
client_device = true
}
# relevant parts
ovf_deploy {
remote_ovf_url = "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.ova"
disk_provisioning = "thin"
}
vapp {
properties = {
"hostname" = "mytestvm.local"
"instance-id" = "" # <--- issue setting var to blank
}
}
}
Debug Output
n/a
Panic Output
No response
Expected Behavior
When I'm setting them to blank I expect for them to be set to blank. This is useful when deploying from template, which already has values set. but I want to reset them on the deployed VM.
It also appears that if the value is set to blank, it gets reset the default value from the OVA, which is not correct behaviour.
Actual Behavior
vApp properties are not set to blank. Value get reset to the default.
Note that its possible to set the value to blank in the vCenter interface.
Steps to Reproduce
- Create VM from OVA using terraform
- After VM has been deployed, run
terraform applyagain. The diff shows thatinstance-idhas not been set blank. Keep in mind that the OVA has a default value for that property.
In vCenter UI:
- Run
terraform applyagain, and step (2) will repeat.
Environment Details
No response
Screenshots
No response
References
No response
rossengeorgiev