time for UFC

This commit is contained in:
Matt Reeves 2024-06-29 10:08:01 -04:00
parent 77ee3920d9
commit 61c860bc63
4 changed files with 136 additions and 10 deletions

71
AI.tf Normal file
View file

@ -0,0 +1,71 @@
resource "proxmox_virtual_environment_vm" "AI" {
# VM General Settings
node_name = "pve2"
vm_id = 322
name = "AI"
machine = "q35"
description = "Ollama, Open Webui, mindsdb"
tags = ["tofu", "ubuntu-22", "auto-homelab-repo"]
started = true
agent {
enabled = true
}
clone {
vm_id = 8101
}
# VM CPU Settings
cpu {
cores = 10
type = "host"
architecture = "x86_64"
}
# VM Memory Settings
memory {
dedicated = 16384
}
# VM Network Settings
network_device {
bridge = "vmbr0"
vlan_id = 1
}
# VM Disk Settings
disk {
datastore_id = "local-lvm"
size = 100
interface = "scsi0"
}
hostpci {
device = "hostpci0"
pcie = true
mapping = "gpu2"
rombar = true
}
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
}
user_data_file_id = proxmox_virtual_environment_file.cloud_config2.id
}
lifecycle {
ignore_changes = [
initialization[0].user_account[0].keys,
initialization[0].user_account[0].password,
initialization[0].user_account[0].username,
]
}
}

63
authentik.tf Normal file
View file

@ -0,0 +1,63 @@
resource "proxmox_virtual_environment_vm" "authentik" {
# VM General Settings
node_name = "pve2"
vm_id = 323
name = "authentik"
tags = ["tofu", "ubuntu-22", "auto-homelab-repo"]
started = true
agent {
enabled = true
}
clone {
vm_id = 8101
}
# VM CPU Settings
cpu {
cores = 4
type = "host"
architecture = "x86_64"
}
# VM Memory Settings
memory {
dedicated = 4096
}
# VM Network Settings
network_device {
bridge = "vmbr0"
vlan_id = 0
}
# VM Disk Settings
disk {
datastore_id = ""
size = 64
interface = "scsi0"
}
serial_device {}
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
}
user_data_file_id = proxmox_virtual_environment_file.cloud_config2.id
}
lifecycle {
ignore_changes = [
initialization[0].user_account[0].keys,
initialization[0].user_account[0].password,
initialization[0].user_account[0].username,
]
}
}

View file

@ -3,7 +3,7 @@ terraform {
required_providers {
proxmox = {
source = "bpg/proxmox"
version = ">= 0.60.0"
version = ">= 0.60.1"
}
}
}

View file

@ -8,7 +8,7 @@ resource "proxmox_virtual_environment_vm" "Ubuntu-22-Template2" {
disk {
datastore_id = "local-lvm"
file_id = proxmox_virtual_environment_download_file.ubuntu_cloud_image_22_2.id
file_id = "local:iso/jammy-server-cloudimg-amd64.img"
interface = "scsi0"
size = 4
}
@ -38,11 +38,3 @@ vga {
}
}
resource "proxmox_virtual_environment_download_file" "ubuntu_cloud_image_22_2" {
content_type = "iso"
datastore_id = "local"
node_name = "pve2"
url = "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
}