mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-01 19:12:59 +00:00
Fields `network_interface_names`, `ipv4_addresses` and `ipv6_addresses` are sometimes be marked `computed` again, using `CustomizeDiff`. Changes in `VMStarted` or `VMNetworkDevice` attributes invalidate those values. Marking fields `computed` again avoids stale values. `network_device` configuration block without `mac_address` results in MAC address set to its default value (an empty string). Terraform state expects `mac_address` to be an empty string, server provides the actual (random) MAC address of the network device. Terraform detects there are changes to be made, but because of `DiffSuppressFunc` on `mac_address` they are hidden from the user, but not from d.HasChange(mkResourceVirtualEnvironmentVMNetworkDevice) By making `mac_address` also `computed`, the server-generated MAC address is stored locally, avoiding spurious changes that trigger re-computation of `network_interface_names`, `ipv4_addresses` and `ipv6_addresses`. |
||
---|---|---|
.. | ||
cluster/firewall | ||
firewall | ||
validator | ||
certificate_test.go | ||
certificate.go | ||
container_test.go | ||
container.go | ||
dns_test.go | ||
dns.go | ||
file_test.go | ||
file.go | ||
group_test.go | ||
group.go | ||
hosts_test.go | ||
hosts.go | ||
pool_test.go | ||
pool.go | ||
role_test.go | ||
role.go | ||
time_test.go | ||
time.go | ||
user_test.go | ||
user.go | ||
utils_test.go | ||
utils.go | ||
vm_test.go | ||
vm.go |