variable "vm_name" {
description = "Domain name, e.g. \"office1-opnsense\", \"dc1-opnsense\"."
type = string
}
variable "memory_mib" {
description = "Memory in MiB. No default -- pass explicitly (OPNsense sizing hasn't been decided; check OPNsense's own hardware-sizing guidance for the expected role before picking a value)."
type = number
}
variable "vcpu" {
description = "Virtual CPU count. No default -- pass explicitly."
type = number
}
variable "pool_name" {
description = "libvirt_pool this VM's disk + config-seed volume live in."
type = string
}
variable "disk_size_bytes" {
description = "Boot disk size in bytes (the backing_store overlay's capacity, not the base nano image's own size). No default -- pass explicitly."
type = number
}
variable "base_volume_path" {
description = <<-EOT
Host filesystem path of the PREPARED (decompressed, qcow2-converted,
resized) OPNsense nano image -- the output of
`scripts/opnsense-prep-image.sh`, typically fed through a
`modules/base-image` call (pass that module's `path` output here; the
same real-attribute-reference pattern modules/cloudinit-vm uses). Do NOT
point this at the raw downloaded .img.bz2 -- libvirt_volume's
create.content.url almost certainly does a plain fetch with no
decompression/conversion; that work must already be done.
EOT
type = string
}
variable "config_iso_path" {
description = <<-EOT
Host filesystem path of a plain ISO9660 image containing
/conf/config.xml -- the output of
`scripts/opnsense-build-config-iso.sh`. This is OPNsense's own
Configuration Importer mechanism (NOT cloud-init -- confirmed unreliable
on OPNsense/FreeBSD; see opentofu/README.md's OPNsense research section).
No default: the real config.xml content for this site's LAN/WAN/routing
role is design work that has to happen first -- do not point this at a
placeholder/empty config.xml to make the module "work" sooner.
EOT
type = string
}
variable "lan_network_name" {
description = <<-EOT
libvirt_network name this edge's LAN-side interface attaches to. OPNsense
defaults interface 1 = LAN (see opentofu/README.md) -- kept as an
explicit named variable rather than an ordered list, deliberately, so a
LAN/WAN swap can't happen silently via list-ordering.
EOT
type = string
}
variable "wan_network_name" {
description = "libvirt_network name this edge's WAN-side interface attaches to (OPNsense's interface 2 = WAN convention -- see opentofu/README.md). The mesh-link legs (modules/mesh-link) or a per-site ISP-simulated segment are the expected callers here."
type = string
}