Files
Hrankin, Aleksandr (contracted) f243f440c3 init
2026-02-19 11:34:13 +00:00

127 lines
1.8 KiB
HCL

variable "vm_id" {
type = number
}
variable "hostname" {
type = string
}
variable "target_node" {
type = string
}
variable "template_file_id" {
type = string
}
variable "os_type" {
type = string
default = "debian"
}
variable "unprivileged" {
type = bool
default = true
}
variable "nesting" {
type = bool
default = true
}
variable "cores" {
type = number
default = 1
}
# Proxmox cpuunits
variable "cpu_units" {
type = number
default = 1024
}
variable "memory" {
type = number
default = 512
}
variable "swap" {
type = number
default = 512
}
variable "rootfs_storage" {
type = string
default = "local-lvm"
}
variable "rootfs_size_gib" {
type = number
default = 8
}
variable "bridge" {
type = string
default = "vmbr0"
}
variable "netif_name" {
type = string
default = "eth0"
}
variable "firewall" {
type = bool
default = true
}
# DHCP: "dhcp"
# Static: "192.168.1.50/24"
variable "ipv4_address" {
type = string
default = "dhcp"
validation {
condition = var.ipv4_address == "dhcp" || can(cidrnetmask(var.ipv4_address))
error_message = "ipv4_address must be \"dhcp\" or a valid CIDR like 192.168.1.50/24."
}
}
# gateway допустим только если не dhcp
variable "ipv4_gateway" {
type = string
default = null
}
# Пароль опциональный (можешь управлять через ssh keys)
variable "password" {
type = string
default = null
sensitive = true
}
variable "ssh_public_keys" {
type = list(string)
default = []
}
variable "dns_domain" {
type = string
default = null
}
variable "dns_servers" {
type = list(string)
default = []
}
variable "started" {
type = bool
default = false
}
variable "start_on_boot" {
type = bool
default = false
}