0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-07-01 19:12:59 +00:00
terraform-provider-proxmox/proxmoxtf/resource
Oto Petřík e15c4a6784
fix(vm): Make mac_address computed, fix #339 (#354)
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`.
2023-05-31 21:12:27 -04:00
..
cluster/firewall feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
firewall feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
validator feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
certificate_test.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
certificate.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
container_test.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
container.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
dns_test.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
dns.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
file_test.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
file.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
group_test.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
group.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
hosts_test.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
hosts.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
pool_test.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
pool.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
role_test.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
role.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
time_test.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
time.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
user_test.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
user.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
utils_test.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
utils.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
vm_test.go feat: API client cleanup and refactoring (#323) 2023-05-26 01:32:51 +00:00
vm.go fix(vm): Make mac_address computed, fix #339 (#354) 2023-05-31 21:12:27 -04:00