Files
terraform/variables.tf
T
2026-10-18 12:33:39 +04:00

435 lines
14 KiB
Terraform

variable "proxmox_api_token" {
type = string
sensitive = true
}
variable "proxmox_root_password" {
type = string
sensitive = true
}
variable "containers" {
type = map(object({
vmid = number
auto_network = optional(bool, true)
memory = optional(number, 512)
swap = optional(number, 256)
cores = optional(number, 2)
size = optional(number, 2)
started = optional(bool, true)
start_on_boot = optional(bool, true)
unprivileged = optional(bool, true)
ip = optional(string, null)
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 = []
})
dns = optional(object({
domain = optional(string)
servers = optional(list(string))
}), {})
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 = {
"router" = {
vmid = 1001
auto_network = false
tags = ["infra","network"]
started = true
start_on_boot = true
networks = [
{
name = "eth0"
bridge = "vmbr0"
firewall = false
vlan_id = 0
hwaddr = "bc:24:11:2f:fa:f6"
},
{
name = "eth1"
bridge = "vmbr1"
firewall = false
vlan_id = 0
hwaddr = "bc:24:11:dd:b3:08"
}
]
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
device_passthrough = [
{
path = "/dev/net/tun"
gid = 0
uid = 0
mode = "0660"
}
]
}
"nginx" = {
vmid = 1010
tags = ["infra","web"]
started = true
start_on_boot = true
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
}
"coturn" = {
vmid = 1011
tags = ["infra","network"]
started = true
start_on_boot = true
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
}
"pgsql" = {
vmid = 1020
tags = ["core","database"]
started = true
start_on_boot = true
memory = 1024
swap = 512
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
mount_point = [
{ volume= "/rpool/data/pgsql/", path = "/mnt/pgsql/" }
]
}
"nfs" = {
vmid = 1021
tags = ["core","storage"]
started = true
start_on_boot = true
unprivileged = false
mount_point = [
{ volume = "/mnt/media1", path = "/mnt/media1" },
{ volume = "/mnt/media2", path = "/mnt/media2" }
]
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
}
"smb-legacy" = {
vmid = 1022
tags = ["core","storage"]
started = true
start_on_boot = true
mount_point = [
{ volume = "/mnt/media1", path = "/mnt/media1" },
{ volume = "/mnt/media2", path = "/mnt/media2" }
]
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
}
"zabbix" = {
vmid = 1030
tags = ["infra","monitoring"]
started = true
start_on_boot = true
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
}
"work" = {
vmid = 1040
tags = ["infra","lg"]
started = true
start_on_boot = true
memory = 6144
swap = 3072
cores = 4
size = 6
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
mount_point = [
{ volume= "/rpool/data/work/", path = "/mnt/work/" }
]
device_passthrough = [
{
path = "/dev/net/tun"
gid = 0
uid = 0
mode = "0660"
}
]
}
"vaultwarden" = {
vmid = 1110
tags = ["services","security"]
started = true
start_on_boot = true
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
mount_point = [
{ volume= "/rpool/data/vaultwarden/", path = "/mnt/vaultwarden/" }
]
}
"ntfy" = {
vmid = 1120
tags = ["services","notify"]
started = true
start_on_boot = true
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
}
"prosody" = {
vmid = 1121
tags = ["services","chat"]
started = true
start_on_boot = true
mount_point = [
{ volume = "/rpool/data/prosody", path = "/mnt/prosody" }
]
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
}
"radicale" = {
vmid = 1122
tags = ["services","dav"]
started = true
start_on_boot = true
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
mount_point = [
{ volume= "/rpool/data/radicale/", path = "/mnt/radicale/" }
]
}
"gitea" = {
vmid = 1123
tags = ["devops","git"]
started = true
start_on_boot = true
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 = "/mnt/gitea/" }
]
}
"runner" = {
vmid = 1124
tags = ["devops","cicd"]
started = true
start_on_boot = true
auto_network = false
ip = "10.1.0.24/24"
gw = "10.1.0.1"
networks = [
{
name = "eth1"
bridge = "vmbr0"
firewall = false
vlan_id = 0
}
]
dns = {
domain = "lan"
servers = ["10.1.0.1"]
}
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
}
"byparr" = {
vmid = 1220
tags = ["media","proxy"]
started = true
start_on_boot = true
memory = 2048
swap = 1024
size = 4
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
}
"prowlarr" = {
vmid = 1221
tags = ["media","indexer"]
started = true
start_on_boot = true
memory = 1024
swap = 512
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
mount_point = [
{ volume= "/rpool/data/prowlarr/", path = "/mnt/prowlarr/" }
]
}
"rtorrent" = {
vmid = 1222
tags = ["media","p2p"]
started = true
start_on_boot = true
mount_point = [
{ volume = "/rpool/data/rtorrent", path = "/mnt/rtorrent" },
{ volume = "/mnt/media1", path = "/mnt/media1" },
{ volume = "/mnt/media2", path = "/mnt/media2" }
]
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
}
"slskd" = {
vmid = 1223
tags = ["media","p2p"]
started = true
start_on_boot = true
mount_point = [
{ volume = "/rpool/data/slskd", path = "/mnt/slskd" },
{ volume = "/mnt/media1/", path = "/mnt/media1/" },
]
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
}
"torrserver" = {
vmid = 1224
tags = ["media","streaming"]
started = true
start_on_boot = true
memory = 4096
swap = 2048
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
}
"lampa" = {
vmid = 1225
tags = ["media", "streaming"]
started = true
start_on_boot = true
memory = 2048
swap = 1024
size = 4
mount_point = [
{ volume= "/rpool/data/lampa/", path = "/mnt/lampa/" }
]
operating_system = {
type = "debian"
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
}
"minidlna" = {
vmid = 1226
tags = ["media", "dlna"]
started = true
start_on_boot = true
mount_point = [
{ volume = "/mnt/media1", path = "/mnt/media1" },
{ volume = "/mnt/media2", path = "/mnt/media2" }
]
operating_system = {
type = "debian"
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
}
"asf" = {
vmid = 1230
tags = ["gaming","automation"]
started = true
start_on_boot = true
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
mount_point = [
{ volume= "/rpool/data/asf/", path = "/mnt/asf/" }
]
}
"ps3netsrv" = {
vmid = 1231
tags = ["gaming","media"]
started = true
start_on_boot = true
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
mount_point = [
{ volume= "/mnt/media2/", path = "/mnt/media2/" }
]
}
"valheim" = {
vmid = 1232
memory = 4096
swap = 2048
cores = 4
size = 2
tags = ["gaming","server"]
started = true
start_on_boot = true
operating_system = {
type = "debian",
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
}
mount_point = [
{ volume= "/rpool/data/valheim/", path = "/mnt/valheim/" }
]
}
}
}