adding some vms

This commit is contained in:
Matt Reeves 2024-06-26 23:20:43 -04:00
parent a7f475f9d9
commit 77ee3920d9
4 changed files with 130 additions and 1 deletions

View file

@ -63,6 +63,8 @@ resource "proxmox_virtual_environment_file" "cloud_config2" {
- curl -fsSL https://get.docker.com | sudo sh
- su - mafyuh -c 'git clone https://git.mafyuh.dev/mafyuh/IaC-Homelab.git /home/mafyuh/IaC-Homelab'
- su - mafyuh -c 'git clone https://git.mafyuh.dev/mafyuh/Auto-Homelab.git /home/mafyuh/Auto-Homelab'
- su - mafyuh -c 'git config --global user.name "Mafyuh"'
- su - mafyuh -c 'git config --global user.email "matt@mafyuh.com"'
- echo "done" > /tmp/cloud-config.done
EOF

64
docker-runner.tf Normal file
View file

@ -0,0 +1,64 @@
resource "proxmox_virtual_environment_vm" "Docker-Runner" {
# VM General Settings
node_name = "prox"
vm_id = 209
name = "docker-runner"
description = "docker-runner for forgejo"
tags = ["tofu", "ubuntu-22", "auto-homelab-repo", "infrastructure"]
agent {
enabled = true # read 'Qemu guest agent' section, change to true only when ready
}
clone {
vm_id = 8100
}
# VM CPU Settings
cpu {
cores = 2
type = "host"
architecture = "x86_64"
}
# VM Memory Settings
memory {
dedicated = 2048
}
# VM Network Settings
network_device {
bridge = "vmbr0"
}
# VM Disk Settings
disk {
datastore_id = "Fast2Tb"
size = 50
interface = "scsi0"
}
vga {
type = "serial0"
}
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
}
user_data_file_id = proxmox_virtual_environment_file.cloud_config.id
}
lifecycle {
ignore_changes = [
initialization[0].user_account[0].keys,
initialization[0].user_account[0].password,
initialization[0].user_account[0].username,
]
}
}

64
docker-runner2.tf Normal file
View file

@ -0,0 +1,64 @@
resource "proxmox_virtual_environment_vm" "Docker-Runner2" {
# VM General Settings
node_name = "prox"
vm_id = 210
name = "docker-runner2"
description = "docker-runner for forgejo"
tags = ["tofu", "ubuntu-22", "auto-homelab-repo", "infrastructure"]
agent {
enabled = true # read 'Qemu guest agent' section, change to true only when ready
}
clone {
vm_id = 8100
}
# VM CPU Settings
cpu {
cores = 2
type = "host"
architecture = "x86_64"
}
# VM Memory Settings
memory {
dedicated = 2048
}
# VM Network Settings
network_device {
bridge = "vmbr0"
}
# VM Disk Settings
disk {
datastore_id = "Fast2Tb"
size = 50
interface = "scsi0"
}
vga {
type = "serial0"
}
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
}
user_data_file_id = proxmox_virtual_environment_file.cloud_config.id
}
lifecycle {
ignore_changes = [
initialization[0].user_account[0].keys,
initialization[0].user_account[0].password,
initialization[0].user_account[0].username,
]
}
}

View file

@ -33,7 +33,6 @@ resource "proxmox_virtual_environment_vm" "Windows11" {
network_device {
bridge = "vmbr0"
vlan_id = 1
}
tpm_state {