Update terraform/main.tf

This commit is contained in:
2026-02-15 20:37:26 +01:00
parent d5fbc06935
commit d306ede24d

View File

@@ -1,23 +1,32 @@
resource "proxmox_vm_qemu" "vm1" { resource "proxmox_vm_qemu" "ubuntu2404" {
name = "terraform-vm" name = "terraform-vm"
target_node = "nuctyzyzen7-1" target_node = "nuctyzyzen7-1"
full_clone = true
cpu { cores = 2
cores = 2 sockets = 1
sockets = 1 memory = 4096
}
memory = 2048
scsihw = "virtio-scsi-pci" scsihw = "virtio-scsi-pci"
machine = "q35" machine = "q35"
agent = 1
# Bootdisk cloned from template # Bootdisk vanaf cloud image
disk { disk {
slot = "virtio0" slot = "scsi0"
type = "disk" type = "disk"
storage = "zfs1" storage = "zfs1"
size = "32G" size = "20G"
format = "qcow2"
cache = "writeback" cache = "writeback"
discard = true discard = true
# Als je image al geüpload is, kun je clone= gebruiken
# clone = "999/virtio0"
}
# Cloud-init drive
disk {
slot = "scsi1"
type = "cdrom"
storage = "zfs1"
} }
network { network {
@@ -26,12 +35,11 @@ resource "proxmox_vm_qemu" "vm1" {
bridge = "vmbr0" bridge = "vmbr0"
} }
# Cloud-init # Cloud-init configuratie
os_type = "cloud-init"
ciuser = "martijn" ciuser = "martijn"
cipassword = "Gwh28dgcmp!" cipassword = "Gwh28dgcmp!"
ipconfig0 = "ip=dhcp" ipconfig0 = "ip=dhcp"
searchdomain = "domain.local" searchdomain = "domain.local"
nameserver = "192.168.178.1" nameserver = "192.168.178.1"
agent = 1
} }