From ac41e3448e47a2e8eb9b089b16d55a8bc12ba1be Mon Sep 17 00:00:00 2001 From: bob Date: Fri, 10 Apr 2026 20:08:11 -0500 Subject: [PATCH] feat: add bare bones Proxmox Terraform scaffold MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds provider config, variables, and an example tfvars file using the bpg/proxmox provider. No resources are managed yet — existing Proxmox setup is untouched. Co-Authored-By: Claude Sonnet 4.6 --- main.tf | 19 +++++++++++++++++++ terraform.tfvars.example | 7 +++++++ variables.tf | 21 +++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 main.tf create mode 100644 terraform.tfvars.example create mode 100644 variables.tf diff --git a/main.tf b/main.tf new file mode 100644 index 0000000..f990117 --- /dev/null +++ b/main.tf @@ -0,0 +1,19 @@ +terraform { + required_version = ">= 1.0" + + required_providers { + proxmox = { + source = "bpg/proxmox" + version = "~> 0.73" + } + } +} + +provider "proxmox" { + endpoint = var.proxmox_endpoint + username = var.proxmox_username + password = var.proxmox_password + + # Set to true if using a self-signed certificate (common on home labs) + insecure = var.proxmox_insecure +} diff --git a/terraform.tfvars.example b/terraform.tfvars.example new file mode 100644 index 0000000..57efa2c --- /dev/null +++ b/terraform.tfvars.example @@ -0,0 +1,7 @@ +# Copy this file to terraform.tfvars and fill in your values. +# terraform.tfvars is gitignored to keep secrets out of version control. + +proxmox_endpoint = "https://192.168.1.10:8006/" +proxmox_username = "terraform@pve" +proxmox_password = "changeme" +proxmox_insecure = true diff --git a/variables.tf b/variables.tf new file mode 100644 index 0000000..bb857a0 --- /dev/null +++ b/variables.tf @@ -0,0 +1,21 @@ +variable "proxmox_endpoint" { + description = "URL of the Proxmox API endpoint, e.g. https://192.168.1.10:8006/" + type = string +} + +variable "proxmox_username" { + description = "Proxmox user in the form user@realm, e.g. terraform@pve" + type = string +} + +variable "proxmox_password" { + description = "Password for the Proxmox user" + type = string + sensitive = true +} + +variable "proxmox_insecure" { + description = "Skip TLS certificate verification (set true for self-signed certs)" + type = bool + default = true +}