# One VM per student: hostname => VMID and IP (10.100.200.80-100) locals { vms = { "vm-00" = { vm_id = 1080, ip = "10.100.200.80" } "vm-01" = { vm_id = 1081, ip = "10.100.200.81" } "vm-02" = { vm_id = 1082, ip = "10.100.200.82" } } } module "vm" { source = "git::https://github.com/CubelaPetar/tf-mod-pve.git?ref=v1.0.0" for_each = local.vms node_name = "pve" vm_id = each.value.vm_id template_vm_id = 903 # temp-debian-13 hostname = each.key domain = "lab.softbox.net" tags = ["student"] ssh_public_key = file(pathexpand(var.ssh_public_key_file)) cpu_cores = 1 memory = 1024 storage = "local-lvm" disk_size = 16 net_bridge = "vmbr0" ip_address = "${each.value.ip}/24" gateway = "10.100.200.4" # Current resolver until the DC/AD takes over DNS nameservers = ["10.100.200.4"] }