fix: use transformed node network values
This commit is contained in:
parent
67f2edbc4d
commit
7d4bb621e6
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue