Files
proxmox-talos/terraform/main.tf
2026-02-14 22:51:16 +01:00

46 lines
867 B
HCL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

data "template_file" "talos_cloudinit" {
template = file("${path.module}/cloudinit/talos-userdata.yaml")
vars = {
hostname = "talos-0"
}
}
resource "proxmox_cloudinit_template" "talos" {
name = "talos-cloudinit"
target_node = "nuctyzyzen7-1"
storage = "local"
}
resource "proxmox_vm_qemu" "talos" {
count = var.node_count
name = "talos-${count.index}"
target_node = "nuctyzyzen7-1"
cores = 2
memory = 4096
scsihw = "virtio-scsi-pci"
# Base disk
disk {
slot = 0
size = "24G"
type = "scsi"
storage = "zfs1"
}
# CloudInit drive
cloudinit {
user_data = data.template_file.talos_cloudinit.rendered
}
# Network
network {
id = 0
model = "virtio"
bridge = var.network_bridge
}
# Boot order zonder ISO
boot = "order=scsi0;net0"
}