init: add initial code

This commit is contained in:
2026-07-29 16:47:06 +02:00
commit 7634f6f86c
2 changed files with 106 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
terraform {
required_providers {
proxmox = {
source = "bpg/proxmox"
version = "~> 0.78.2"
}
}
}
resource "proxmox_virtual_environment_vm" "this" {
name = var.vm_name
node_name = var.node_name
vm_id = var.vm_id
clone {
vm_id = var.template_id
}
agent {
enabled = true
}
cpu {
cores = var.cpu_cores
type = "x86-64-v2-AES"
}
memory {
dedicated = var.memory_mb
}
network_device {
bridge = var.bridge
}
initialization {
hostname = var.vm_name
ip_config {
ipv4 {
address = var.ip_address
gateway = var.gateway
}
}
user_account {
username = "debian"
keys = [var.ssh_public_key]
}
}
}