chore: set storage location to local

This commit is contained in:
2025-10-02 21:46:31 +10:00
parent 30e36beb93
commit c5559fbb38
6 changed files with 74 additions and 96 deletions

View File

@@ -1,42 +0,0 @@
resource "proxmox_lxc" "pihole" {
depends_on = [
proxmox_vm_qemu.dev-docker
]
target_node = "pve-dev"
vmid = "200"
hostname = "pihole"
ostemplate = "local:vztmpl/debian-13-standard_13.1-1_amd64.tar.zst"
password = var.ci_password
unprivileged = false
ostype = "debian"
onboot = true
start = true
startup = "order=1000"
ssh_public_keys = <<EOF
${var.ssh_key}
EOF
memory = "4096"
swap = "512"
rootfs {
storage = "local"
size = "8G"
}
features {
fuse = true
nesting = true
mount = "nfs;cifs"
}
network {
name = "eth0"
bridge = "vmbr0"
ip = "10.10.40.2/24"
gw = "10.10.40.1"
tag = 40
}
}

View File

@@ -1,44 +0,0 @@
resource "proxmox_lxc" "ghshr" {
depends_on = [
proxmox_vm_qemu.dev-docker
]
target_node = "pve"
vmid = "201"
hostname = "ghshr"
ostemplate = "local:vztmpl/debian-13-standard_13.1-1_amd64.tar.zst"
password = var.ci_password
unprivileged = false
ostype = "debian"
onboot = true
start = true
startup = "order=1000"
ssh_public_keys = <<EOF
${var.ssh_key}
EOF
memory = "4096"
swap = "512"
rootfs {
storage = "local-zfs"
size = "8G"
}
features {
fuse = true
nesting = true
mount = "nfs;cifs"
}
network {
name = "eth0"
bridge = "vmbr0"
ip = "10.10.10.8/24"
gw = "10.10.10.1"
tag = 10
}
}

59
201-pihole.tf Normal file
View File

@@ -0,0 +1,59 @@
resource "proxmox_lxc" "pihole" {
# depends_on = [
# proxmox_vm_qemu.dev-docker
# ]
target_node = "pve"
vmid = "201"
hostname = "pihole"
ostemplate = "local:vztmpl/debian-13-standard_13.1-1_amd64.tar.zst"
password = var.ci_password
unprivileged = false
ostype = "debian"
onboot = true
start = true
startup = "order=1000"
tags = "dns;container"
ssh_public_keys = <<EOF
${var.ssh_key}
EOF
memory = "4096"
swap = "512"
rootfs {
storage = "local"
size = "8G"
}
// Bind Mount Point
mountpoint {
key = "1"
slot = 1
storage = "/mnt/lxc/pihole"
// Without 'volume' defined, Proxmox will try to create a volume with
// the value of 'storage' + : + 'size' (without the trailing G) - e.g.
// "/srv/host/bind-mount-point:256".
// This behaviour looks to be caused by a bug in the provider.
volume = "/mnt/lxc/pihole"
mp = "/data"
size = "1G"
}
features {
fuse = true
nesting = true
mount = "nfs;cifs"
}
network {
name = "eth0"
bridge = "vmbr0"
ip = "10.10.10.10/24"
gw = "10.10.10.1"
tag = 10
ip6 = "auto"
}
}

View File

@@ -1,9 +1,9 @@
resource "proxmox_lxc" "omada" {
depends_on = [
proxmox_vm_qemu.dev-docker
]
# depends_on = [
# proxmox_vm_qemu.dev-docker
# ]
target_node = "pve"
vmid = "203"
vmid = "202"
hostname = "omada"
ostemplate = "local:vztmpl/debian-13-standard_13.1-1_amd64.tar.zst"
password = var.ci_password
@@ -12,6 +12,7 @@ resource "proxmox_lxc" "omada" {
onboot = true
start = true
startup = "order=1000"
tags = "docker;container;appliance"
ssh_public_keys = <<EOF
@@ -22,7 +23,7 @@ resource "proxmox_lxc" "omada" {
swap = "512"
rootfs {
storage = "local-zfs"
storage = "local"
size = "8G"
}
@@ -38,5 +39,6 @@ resource "proxmox_lxc" "omada" {
ip = "10.10.40.2/24"
gw = "10.10.40.1"
tag = 40
ip6 = "auto"
}
}

View File

@@ -4,13 +4,14 @@ resource "proxmox_vm_qemu" "dev-docker" {
target_node = "pve"
vmid = "400"
name = "dev-docker"
tags = "linux;vm;docker"
# VM Advanced General Settings
onboot = true
scsihw = "virtio-scsi-single"
# VM OS Settings
clone = "debian-12-generic-amd64"
clone = "debian-13-generic-amd64"
clone_wait = 120
timeouts {
create = "1h"
@@ -47,7 +48,7 @@ resource "proxmox_vm_qemu" "dev-docker" {
efidisk {
efitype = "4m"
storage = "local-zfs"
storage = "local"
}
disks {
@@ -59,7 +60,7 @@ resource "proxmox_vm_qemu" "dev-docker" {
}
ide3 {
cloudinit {
storage = "local-zfs"
storage = "local"
}
}
}
@@ -67,7 +68,7 @@ resource "proxmox_vm_qemu" "dev-docker" {
scsi0 {
disk {
size = 80
storage = "local-zfs"
storage = "local"
}
}
}

View File

@@ -11,7 +11,9 @@ terraform {
}
}
backend "pg" {}
backend "pg" {
schema_name = "homelab-infra"
}
encryption {
key_provider "pbkdf2" "mykey" {
passphrase = var.passphrase