PoC OpenTofu configuration works

This commit is contained in:
2026-06-09 09:39:23 +02:00
parent edede0b568
commit 8990d34565
6 changed files with 144 additions and 0 deletions

48
template.tf Normal file
View File

@@ -0,0 +1,48 @@
resource "proxmox_virtual_environment_vm" "ubuntu_template" {
name = "ubuntu-template"
node_name = var.virtual_environment_node_name
template = true
started = false
machine = "q35"
bios = "ovmf"
description = "Managed by OpenTofu"
cpu {
cores = 2
}
memory {
dedicated = 2048
}
efi_disk {
datastore_id = var.datastore_id
type = "4m"
}
disk {
datastore_id = var.datastore_id
file_id = "local:iso/jammy-server-cloudimg-amd64.img"
interface = "virtio0"
iothread = true
discard = "on"
size = 20
}
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
}
user_data_file_id = proxmox_virtual_environment_file.user_data_cloud_config.id
}
network_device {
bridge = "vmbr0"
}
}