diff --git a/.gitignore b/.gitignore index d5abc74..d32217b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ */.terraform */.terraform.lock.hcl +.idea diff --git a/dmz/main.tf b/dmz/main.tf index 4a949bd..eb23c67 100644 --- a/dmz/main.tf +++ b/dmz/main.tf @@ -55,4 +55,14 @@ locals { node = ["mothership"] ip = ["20"] } + matrix = { + tags = "matrix" + count = 1 + name = ["matrix"] + cores = 2 + memory = "4096" + drive = 60 + node = ["vanguard"] + ip = ["21"] + } } diff --git a/dmz/matrix.tf b/dmz/matrix.tf new file mode 100644 index 0000000..66dd4c7 --- /dev/null +++ b/dmz/matrix.tf @@ -0,0 +1,57 @@ +resource "proxmox_vm_qemu" "matrix" { + count = local.matrix.count + ciuser = "administrator" + vmid = "${local.vlan}${local.matrix.ip[count.index]}" + name = local.matrix.name[count.index] + target_node = local.matrix.node[count.index] + clone = local.template + tags = local.matrix.tags + qemu_os = "l26" + full_clone = true + os_type = "cloud-init" + agent = 1 + cores = local.matrix.cores + sockets = 1 + cpu_type = "host" + memory = local.matrix.memory + scsihw = "virtio-scsi-pci" + #bootdisk = "scsi0" + boot = "order=virtio0" + onboot = true + sshkeys = local.sshkeys + vga { + type = "serial0" + } + serial { + id = 0 + type = "socket" + } + disks { + ide { + ide2 { + cloudinit { + storage = local.storage + } + } + } + virtio { + virtio0 { + disk { + size = local.matrix.drive + format = local.format + storage = local.storage + } + } + } + } + network { + id = 0 + model = "virtio" + bridge = "vmbr0" + tag = local.vlan + } + #Cloud Init Settings + ipconfig0 = "ip=192.168.${local.vlan}.${local.matrix.ip[count.index]}/24,gw=192.168.${local.vlan}.1" + searchdomain = "durp.loc" + nameserver = local.dnsserver +}