Managing Proxmox Infrastructure with Terraform
This session demonstrates how to transform a home Proxmox virtualization environment into a code-managed private cloud using HCP Terraform and CI/CD pipelines. The speaker addresses common challenges in manual infrastructure management — forgotten configurations, lack of reproducibility, and operational inefficiencies — and shows how Infrastructure as Code principles solve these problems. Using community Terraform providers (specifically the BPG Proxmox provider), administrators can declaratively manage VMs, containers, networks, and firewalls. The approach enables configuration versioning, change tracking, and consistent environment reproduction, bringing enterprise cloud practices to on-premises and home lab environments.
Remote Execution with HCP Terraform Agents
A key technical challenge addressed is enabling HCP Terraform to manage local Proxmox infrastructure without exposing inbound network access. The solution uses HCP Terraform agents — lightweight services installed on a local server that pull execution requests from HCP Terraform over outbound connections. This architecture allows remote plan and apply operations while maintaining security, as the agent communicates with the local Proxmox API directly. The setup requires creating an agent pool in HCP Terraform, installing the agent service on a local server (which can itself be a Proxmox VM), and configuring the workspace to use agent-based execution mode.
CI/CD Integration with Version Control
The final layer integrates GitHub with HCP Terraform through VCS-driven workflows, eliminating manual Terraform CLI operations and ensuring code repository state matches deployed infrastructure. When code is pushed to GitHub, HCP Terraform automatically triggers plan and apply operations through the configured agent. This setup supports tag-based triggers for controlled deployments and can be configured for automatic or approval-required apply operations. The speaker emphasizes starting small and iterating rather than attempting perfect implementation immediately, recommending gradual expansion of Terraform-managed resources over time.