fix: use transformed node network values

This commit is contained in:
eding 2026-07-20 00:21:45 +02:00
parent 67f2edbc4d
commit 7d4bb621e6

View file

@ -125,10 +125,10 @@ resource "proxmox_virtual_environment_vm" "vm" {
type = "nocloud"
dynamic "ip_config" {
for_each = each.value.networks[0].ip != null ? [each.value.networks[0]] : []
for_each = each.value.ip != null ? [each.value] : []
content {
ipv4 {
address = "${ip_config.value.ip}/${split("/", ip_config.value.cidr)[1]}"
address = "${ip_config.value.ip}/${split("/", ip_config.value.network_cidr)[1]}"
gateway = ip_config.value.gateway
}
}