Files
iac-opentofu-public/proxmox.tf
Tomás Limpinho 586ddcac65 ns mais
2025-08-19 22:44:16 +01:00

59 lines
1.1 KiB
HCL

provider "proxmox" {
pm_api_url = var.proxmox_server
}
resource "proxmox_pool" "resource-pool" {
poolid = "resource-pool"
comment = "pool auto created"
}
resource "proxmox_vm_qemu" "vm-kubernetes-01" {
name = "VM-kubernetes-01"
target_node = "fenix"
vmid = 1001
description = "VM kubernetes 01 created via iac"
bios = "seabios"
onboot = true
vm_state = "running"
boot = "order=scsi0;ide2;net0"
agent = 1
hastate = "enabled"
hagroup = "kubernetes-group"
memory = 4096
hotplug = "network,disk,usb"
scsihw = "virtio-scsi-single"
pool = "resource-pool"
tags = "iac-tag"
os_type = "ubuntu"
cpu {
cores = 2
sockets = 1
type = "host"
}
network {
id = 0
model = "virtio"
bridge = "vmbr0"
}
disk {
type = "scsi"
storage = "local-lvm"
size = "64G"
backup = true
}
cdrom {
iso = "Fedora-Workstation-Live-x86_64-41-1.4.iso"
storage = "local-lvm"
}
efidisk {
size = "4M"
storage = "local-lvm"
}
ipconfig0 = "ip=192.168.1.24/24"
}