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 +}