![Header Image](https://miro.medium.com/v2/resize:fit:4000/1*16DgdobhWUUXKzF4fwjOdw.png) [![deploy-containers](https://github.com/comprofix/opentofu-homelab/actions/workflows/infra-build.yml/badge.svg)](https://github.com/comprofix/opentofu-homelab/actions) ## 📖 Overview Infrastructure as Code (IaC) for the Comprofix homelab using [OpenTofu](https://opentofu.org/). This repository provisions and manages resources such as the Proxmox VMs and LXC containers used in the Comprofix Homelab --- ## 🚀 Features - Declarative infrastructure management with OpenTofu - Remote state stored in PostgreSQL backend - Secure injection of secrets into `terraform.auto.tfvars` - Supports Proxmox VM provisioning and Omada configuration --- ## 🔄 Workflow 1. Checkout repo 2. Generate `terraform.auto.tfvars` 3. Run `tofu init`, `tofu fmt`, `tofu validate` 4. Execute `tofu plan` 5. If successful, run `tofu apply` --- ## 📖 Usage Local testing: ```bash # Initialize tofu init # Format configs tofu fmt -recursive # Validate configs tofu validate # Plan changes PG_CONN_STR="postgres://..." tofu plan # Apply changes PG_CONN_STR="postgres://..." tofu apply