update vars again

This commit is contained in:
admin 2026-01-28 14:52:03 -07:00
parent 85612c5d22
commit 137eff456c

View file

@ -1,28 +1,43 @@
resource "proxmox_virtual_environment_container" "cattle" {
for_each = var.lxc_inventory
# Now it looks at the 'node' value for each specific LXC
target_node = each.value.node
hostname = each.value.hostname
vmid = each.key
ostemplate = "local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.zst"
password = var.lxc_root_password
unprivileged = true
node_name = each.value.node
vm_id = each.key
cores = each.value.cores
memory = each.value.memory
rootfs {
storage = "local-lvm"
size = each.value.disk_size
initialization {
hostname = each.value.hostname
user_account {
password = var.lxc_root_password
}
ip_config {
ipv4 {
address = each.value.ip
gateway = each.value.gw
}
}
}
network {
operating_system {
template_file_id = "local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.zst"
type = "ubuntu"
}
cpu {
cores = each.value.cores
}
memory {
dedicated = each.value.memory
}
disk {
datastore_id = "local-lvm"
size = tonumber(replace(each.value.disk_size, "G", "")) # Converts "20G" to 20
}
network_interface {
name = "eth0"
bridge = "vmbr0"
ip = each.value.ip
gw = each.value.gw
tag = each.value.vlan
vlan_id = each.value.vlan
}
}