Files
homelab-infra/docker.tf

94 lines
1.4 KiB
HCL

resource "proxmox_vm_qemu" "dev-docker" {
# VM General Settings
target_node = "pve"
vmid = "400"
name = "dev-docker"
tags = null
# VM Advanced General Settings
onboot = true
scsihw = "virtio-scsi-single"
# VM OS Settings
clone = "debian-12-generic-amd64"
clone_wait = 120
timeouts {
create = "1h"
delete = "1h"
}
# VM System Settings
agent = 0
machine = "q35"
qemu_os = "l26"
# VM CPU Settings
cpu {
cores = 1
sockets = 4
type = "x86-64-v2-AES"
}
bios = "ovmf"
startup = "order=2"
# VM Memory Settings
memory = 16384
# VM Network Settings
network {
id = 0
bridge = "vmbr0"
model = "virtio"
tag = "10"
}
efidisk {
efitype = "4m"
storage = "local"
}
disks {
ide {
ide2 {
cdrom {
passthrough = false
}
}
ide3 {
cloudinit {
storage = "local"
}
}
}
scsi {
scsi0 {
disk {
size = 80
storage = "local"
}
}
}
}
# VM Cloud-Init Settings
os_type = "cloud-init"
# (Optional) IP Address and Gateway
ipconfig0 = "ip=10.10.10.20/24,gw=10.10.10.1"
nameserver = "10.10.10.1"
# (Optional) Default User
ciuser = var.ci_user # Updated
cipassword = var.ci_password # Updated
# (Optional) Add your SSH Public KEY
sshkeys = <<EOF
${var.ssh_key}
EOF
}