mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-01 11:02: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`. |
||
---|---|---|
.. | ||
datasource | ||
provider | ||
resource | ||
structure | ||
test | ||
config.go |