TerraformPilot

Hub

Terraform & OpenTofu for On-Prem, Homelab & Network Gear

Terraform and OpenTofu guides for Proxmox, Hyper-V, vSphere, Nutanix, XCP-ng, TrueNAS, Synology and Unraid, plus Cisco, Juniper, Arista and MikroTik.

  • Hypervisors
  • NAS
  • Network devices

Short answer: Terraform and OpenTofu manage on-prem and homelab infrastructure the same way they manage a cloud: through a provider that talks to the platform's API. Use bpg/proxmox for Proxmox VE, hashicorp/vsphere for VMware vSphere and ESXi, taliesins/hyperv for Hyper-V (over WinRM), nutanix/nutanix for Nutanix AHV (through Prism Central) and terra-farm/xenorchestra for XCP-ng. Cisco, Juniper and Arista devices have vendor providers, and community providers cover MikroTik RouterOS and TrueNAS Scale. Synology DSM and Unraid have no official provider, so Terraform manages what sits around them: DNS, tunnels and backup buckets.

This hub collects the on-prem, homelab and network-device guides on Terraform Pilot, grouped by layer. Each guide has working HCL for its provider.

Which provider for which platform

#
PlatformProvider in the guideGuide
Proxmox VE (VMs and LXC)bpg/proxmox (community)Proxmox VE VMs and containers
Microsoft Hyper-Vtaliesins/hyperv (community, WinRM)Hyper-V provider and VMs
VMware vSphere / ESXihashicorp/vsphere (official)vSphere provider setup
Nutanix AHVnutanix/nutanix (official)Nutanix AHV VMs
Xen / XCP-ngterra-farm/xenorchestraXen and XCP-ng
TrueNAS Scaledariusbakunas/truenas (community)TrueNAS Scale and ZFS
Synology DSMNo official provider; Mastercard/restapi for the DSM APISynology DSM
UnraidNo provider; manage Cloudflare and Backblaze B2 around itUnraid homelab
Talos Linuxsiderolabs/talosTalos Linux Kubernetes nodes
Cisco IOS XECiscoDevNet/iosxe (official)Cisco IOS XE
Cisco NX-OSCiscoDevNet/nxosCisco NX-OS data center
Juniper JunosJuniper/junosJuniper Junos
Arista EOSaristanetworks/cloudvisionArista EOS and CloudVision
MikroTik RouterOSterraform-routeros/routeros (community)MikroTik RouterOS
SONiCNo single official provider; templated config_db.json or gNMISONiC

Hypervisors and private cloud

#

Homelab storage and NAS

#

Network devices

#

Operating systems on your own hardware

#

Running these guides with OpenTofu

#

The HCL in these guides is ordinary provider configuration, so OpenTofu runs it unchanged as long as the provider is published in the OpenTofu registry. Replace terraform with tofu in the commands.

Provision, then configure

#

Terraform creates the VMs and network objects; a configuration tool then sets up what runs inside them.