Files
PSProxmoxVE/tests/infrastructure/variables.tf
T
Clint Branham a424dd18ac refactor(ci): parallel provisioning, file caching, provision/test/cleanup split
Restructures the integration test workflow from a monolithic sequential
job into separate provision → test → cleanup stages:

- provision: creates ALL nested PVE VMs in a single terraform apply
  (parallel), waits for APIs, creates tokens, passes outputs to tests
- test: matrix [pve9, pve8] consumes provision outputs, no provisioning
- cleanup: always runs, API-only teardown for all VMs

Terraform refactored to for_each with pve_instances map variable,
enabling parallel ISO upload and VM creation.

New caching scripts reduce redundant downloads:
- ensure-base-iso.sh: downloads PVE ISOs to /opt/pve-isos if missing
- ensure-cloud-images.sh: caches cloud image + OVA with 7-day TTL
- prepare-auto-iso.sh: --cache-dir flag with hash-based skip

Runner no longer needs manual ISO provisioning (zero-touch setup).
cleanup-images bumped to min-versions-to-keep: 3 to survive overlapping
runs. All jobs gated against dependabot.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 16:05:20 -05:00

74 lines
1.9 KiB
Terraform

variable "proxmox_endpoint" {
description = "URL of the existing Proxmox VE API (e.g. https://pve.example.com:8006)"
type = string
}
variable "proxmox_api_token" {
description = "API token for authenticating with the existing Proxmox host (user@realm!tokenid=secret)"
type = string
sensitive = true
}
variable "proxmox_insecure" {
description = "Whether to skip TLS verification when connecting to the Proxmox API"
type = bool
default = true
}
variable "target_node" {
description = "Name of the Proxmox node where the nested PVE VMs will be created"
type = string
}
variable "pve_instances" {
description = "Map of PVE instances to provision. Key is a label (e.g. 'pve9'), value defines the VM."
type = map(object({
iso_local_path = string
vm_id = number
vm_name = string
}))
}
variable "cores" {
description = "Number of CPU cores to allocate to each nested PVE VM"
type = number
default = 4
}
variable "memory" {
description = "Amount of memory in MB to allocate to each nested PVE VM"
type = number
default = 8192
}
variable "disk_size" {
description = "Size of the primary disk in GB for each nested PVE VM"
type = number
default = 64
}
variable "disk_storage" {
description = "Proxmox storage pool for VM disks (must support raw format)"
type = string
default = "nas-iSCSI-lvm"
}
variable "iso_storage" {
description = "Proxmox storage pool for uploading the ISO (must accept ISO content type)"
type = string
default = "local"
}
variable "network_bridge" {
description = "Network bridge on the host to attach the nested PVE VMs to"
type = string
default = "Core"
}
variable "test_vm_password" {
description = "Root password for the nested PVE instances"
type = string
sensitive = true
default = "Testpass123!"
}