2026-08-16 23:54:26 +00:00
|
|
|
variable "proxmox_api_token" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
}
|
|
|
|
|
variable "proxmox_root_password" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
}
|
|
|
|
|
variable "containers" {
|
|
|
|
|
type = map(object({
|
|
|
|
|
vmid = number
|
|
|
|
|
memory = optional(number, 128)
|
|
|
|
|
swap = optional(number, 64)
|
|
|
|
|
cores = optional(number, 1)
|
|
|
|
|
size = optional(number, 1)
|
|
|
|
|
started = optional(bool, true)
|
|
|
|
|
start_on_boot = optional(bool, true)
|
|
|
|
|
unprivileged = optional(bool, true)
|
2026-09-07 19:53:00 +00:00
|
|
|
ip = optional(string, null)
|
2026-08-16 23:54:26 +00:00
|
|
|
gw = optional(string)
|
|
|
|
|
nameserver = optional(string)
|
|
|
|
|
tags = optional(list(string), [])
|
|
|
|
|
networks = optional(list(object({
|
|
|
|
|
name = optional(string, "eth0")
|
|
|
|
|
bridge = optional(string, "vmbr0")
|
|
|
|
|
vlan_id = optional(number)
|
|
|
|
|
hwaddr = optional(string)
|
|
|
|
|
firewall = optional(bool, false)
|
|
|
|
|
})), [])
|
|
|
|
|
features = optional(object({
|
|
|
|
|
fuse = optional(bool, false)
|
|
|
|
|
keyctl = optional(bool, false)
|
|
|
|
|
mknod = optional(bool, false)
|
|
|
|
|
nesting = optional(bool, true)
|
|
|
|
|
mount = optional(list(string), [])
|
|
|
|
|
}), {
|
|
|
|
|
fuse = false
|
|
|
|
|
keyctl = false
|
|
|
|
|
mknod = false
|
|
|
|
|
nesting = true
|
|
|
|
|
mount = []
|
|
|
|
|
})
|
|
|
|
|
mount_point = optional(list(object({
|
|
|
|
|
volume = string
|
|
|
|
|
size = optional(number)
|
|
|
|
|
path = string
|
|
|
|
|
})), [])
|
|
|
|
|
device_passthrough = optional(list(object({
|
|
|
|
|
path = string
|
|
|
|
|
gid = optional(number, 0)
|
|
|
|
|
uid = optional(number, 0)
|
|
|
|
|
mode = optional(string, "0660")
|
|
|
|
|
deny_write = optional(bool, false)
|
|
|
|
|
})), [])
|
|
|
|
|
operating_system = optional(object({
|
|
|
|
|
type = optional(string, "alpine")
|
|
|
|
|
template_file_id = optional(string, "")
|
|
|
|
|
}), {
|
|
|
|
|
type = "alpine"
|
|
|
|
|
template_file_id = ""
|
|
|
|
|
})
|
|
|
|
|
}))
|
|
|
|
|
default = {
|
2026-09-07 19:53:00 +00:00
|
|
|
"router" = {
|
|
|
|
|
vmid = 101
|
2026-08-16 23:54:26 +00:00
|
|
|
memory = 1024
|
|
|
|
|
swap = 128
|
|
|
|
|
cores = 1
|
2026-09-07 19:53:00 +00:00
|
|
|
size = 2
|
2026-08-16 23:54:26 +00:00
|
|
|
tags = ["main"]
|
2026-09-07 19:53:00 +00:00
|
|
|
started = true
|
|
|
|
|
start_on_boot = true
|
2026-08-16 23:54:26 +00:00
|
|
|
ip = ""
|
|
|
|
|
networks = [
|
|
|
|
|
{
|
|
|
|
|
name = "eth0"
|
|
|
|
|
bridge = "vmbr0"
|
|
|
|
|
firewall = false
|
|
|
|
|
vlan_id = 0
|
2026-09-07 19:53:00 +00:00
|
|
|
hwaddr = "bc:24:11:2f:fa:f6"
|
2026-08-16 23:54:26 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name = "eth1"
|
|
|
|
|
bridge = "vmbr1"
|
|
|
|
|
firewall = false
|
|
|
|
|
vlan_id = 0
|
2026-09-07 19:53:00 +00:00
|
|
|
hwaddr = "bc:24:11:dd:b3:08"
|
2026-08-16 23:54:26 +00:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
operating_system = {
|
|
|
|
|
type = "debian",
|
|
|
|
|
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-09-07 19:53:00 +00:00
|
|
|
"steamcmd" = {
|
|
|
|
|
vmid = 1203
|
|
|
|
|
memory = 6144
|
|
|
|
|
swap = 128
|
|
|
|
|
cores = 8
|
|
|
|
|
size = 2
|
|
|
|
|
tags = ["games"]
|
|
|
|
|
started = true
|
|
|
|
|
start_on_boot = true
|
|
|
|
|
networks = [
|
|
|
|
|
{
|
|
|
|
|
vlan_id = 12
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
operating_system = {
|
|
|
|
|
type = "debian",
|
|
|
|
|
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
|
|
|
|
|
}
|
|
|
|
|
mount_point = [
|
|
|
|
|
{ volume= "/rpool/data/steamcmd/", path = "/mnt/steamcmd/" }
|
|
|
|
|
]
|
|
|
|
|
}
|
2026-08-16 23:54:26 +00:00
|
|
|
#"GITEA-TEST" = {
|
|
|
|
|
# vmid = 1012
|
|
|
|
|
# memory = 2048
|
|
|
|
|
# swap = 1024
|
|
|
|
|
# cores = 2
|
|
|
|
|
# size = 1
|
|
|
|
|
# operating_system = {
|
|
|
|
|
# type = "debian",
|
|
|
|
|
# template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
|
|
|
|
|
# }
|
|
|
|
|
# mount_point = [
|
|
|
|
|
# { VOLUME = "/RPOOL/DATa/gitea/", path = "/var/lib/gitea/" }
|
|
|
|
|
# ]
|
|
|
|
|
# }
|
|
|
|
|
#"pgsql-test" = {
|
|
|
|
|
# vmid = 1011
|
|
|
|
|
# memory = 2048
|
|
|
|
|
# swap = 1024
|
|
|
|
|
# cores = 2
|
|
|
|
|
# size = 1
|
|
|
|
|
# OPERATING_SYSTEM = {
|
|
|
|
|
# type = "debian"
|
|
|
|
|
# template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
|
|
|
|
|
# }
|
|
|
|
|
# mount_point = [
|
|
|
|
|
# { volume = "/rpool/data/postgresql/pgdata", path = "/var/lib/postgresql/17/main" },
|
|
|
|
|
# { volume = "/rpool/data/postgresql/pgbackup", path = "/var/lib/postgresql/17/backup" }
|
|
|
|
|
# ]
|
|
|
|
|
#}
|
|
|
|
|
}
|
|
|
|
|
}
|