chore: set storage location to local
This commit is contained in:
@@ -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
|
|
||||||
}
|
|
||||||
}
|
|
@@ -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
59
201-pihole.tf
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
@@ -1,9 +1,9 @@
|
|||||||
resource "proxmox_lxc" "omada" {
|
resource "proxmox_lxc" "omada" {
|
||||||
depends_on = [
|
# depends_on = [
|
||||||
proxmox_vm_qemu.dev-docker
|
# proxmox_vm_qemu.dev-docker
|
||||||
]
|
# ]
|
||||||
target_node = "pve"
|
target_node = "pve"
|
||||||
vmid = "203"
|
vmid = "202"
|
||||||
hostname = "omada"
|
hostname = "omada"
|
||||||
ostemplate = "local:vztmpl/debian-13-standard_13.1-1_amd64.tar.zst"
|
ostemplate = "local:vztmpl/debian-13-standard_13.1-1_amd64.tar.zst"
|
||||||
password = var.ci_password
|
password = var.ci_password
|
||||||
@@ -12,6 +12,7 @@ resource "proxmox_lxc" "omada" {
|
|||||||
onboot = true
|
onboot = true
|
||||||
start = true
|
start = true
|
||||||
startup = "order=1000"
|
startup = "order=1000"
|
||||||
|
tags = "docker;container;appliance"
|
||||||
|
|
||||||
|
|
||||||
ssh_public_keys = <<EOF
|
ssh_public_keys = <<EOF
|
||||||
@@ -22,7 +23,7 @@ resource "proxmox_lxc" "omada" {
|
|||||||
swap = "512"
|
swap = "512"
|
||||||
|
|
||||||
rootfs {
|
rootfs {
|
||||||
storage = "local-zfs"
|
storage = "local"
|
||||||
size = "8G"
|
size = "8G"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,5 +39,6 @@ resource "proxmox_lxc" "omada" {
|
|||||||
ip = "10.10.40.2/24"
|
ip = "10.10.40.2/24"
|
||||||
gw = "10.10.40.1"
|
gw = "10.10.40.1"
|
||||||
tag = 40
|
tag = 40
|
||||||
|
ip6 = "auto"
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -4,13 +4,14 @@ resource "proxmox_vm_qemu" "dev-docker" {
|
|||||||
target_node = "pve"
|
target_node = "pve"
|
||||||
vmid = "400"
|
vmid = "400"
|
||||||
name = "dev-docker"
|
name = "dev-docker"
|
||||||
|
tags = "linux;vm;docker"
|
||||||
|
|
||||||
# VM Advanced General Settings
|
# VM Advanced General Settings
|
||||||
onboot = true
|
onboot = true
|
||||||
scsihw = "virtio-scsi-single"
|
scsihw = "virtio-scsi-single"
|
||||||
|
|
||||||
# VM OS Settings
|
# VM OS Settings
|
||||||
clone = "debian-12-generic-amd64"
|
clone = "debian-13-generic-amd64"
|
||||||
clone_wait = 120
|
clone_wait = 120
|
||||||
timeouts {
|
timeouts {
|
||||||
create = "1h"
|
create = "1h"
|
||||||
@@ -47,7 +48,7 @@ resource "proxmox_vm_qemu" "dev-docker" {
|
|||||||
|
|
||||||
efidisk {
|
efidisk {
|
||||||
efitype = "4m"
|
efitype = "4m"
|
||||||
storage = "local-zfs"
|
storage = "local"
|
||||||
}
|
}
|
||||||
|
|
||||||
disks {
|
disks {
|
||||||
@@ -59,7 +60,7 @@ resource "proxmox_vm_qemu" "dev-docker" {
|
|||||||
}
|
}
|
||||||
ide3 {
|
ide3 {
|
||||||
cloudinit {
|
cloudinit {
|
||||||
storage = "local-zfs"
|
storage = "local"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,7 +68,7 @@ resource "proxmox_vm_qemu" "dev-docker" {
|
|||||||
scsi0 {
|
scsi0 {
|
||||||
disk {
|
disk {
|
||||||
size = 80
|
size = 80
|
||||||
storage = "local-zfs"
|
storage = "local"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -11,7 +11,9 @@ terraform {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
backend "pg" {}
|
backend "pg" {
|
||||||
|
schema_name = "homelab-infra"
|
||||||
|
}
|
||||||
encryption {
|
encryption {
|
||||||
key_provider "pbkdf2" "mykey" {
|
key_provider "pbkdf2" "mykey" {
|
||||||
passphrase = var.passphrase
|
passphrase = var.passphrase
|
||||||
|
Reference in New Issue
Block a user