✨ Enhance variable descriptions in Terraform configuration for clarity and usability
This commit is contained in:
10
main.tf
10
main.tf
@@ -1,3 +1,13 @@
|
|||||||
|
/**
|
||||||
|
* # Root Configuration
|
||||||
|
*
|
||||||
|
* Orchestrates the homelab infrastructure:
|
||||||
|
* - **pip** – Discovers the current public IP for firewall allowlisting.
|
||||||
|
* - **pangolin** – Deploys an Azure Linux VM as a reverse-proxy / WireGuard gateway.
|
||||||
|
* - **foundry** – Creates a Proxmox LXC container running Foundry VTT.
|
||||||
|
* - **dns** – Manages Cloudflare DNS records pointing at the Pangolin proxy.
|
||||||
|
*/
|
||||||
|
|
||||||
module "pip" {
|
module "pip" {
|
||||||
source = "./modules/pip"
|
source = "./modules/pip"
|
||||||
}
|
}
|
||||||
|
|||||||
56
variables.tf
56
variables.tf
@@ -1,46 +1,84 @@
|
|||||||
variable "domain" {
|
variable "domain" {
|
||||||
|
description = "Root domain name managed in Cloudflare."
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "domain_zone_id" {
|
variable "domain_zone_id" {
|
||||||
|
description = "Cloudflare Zone ID for the domain."
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "cloudflare_api_token" {
|
variable "cloudflare_api_token" {
|
||||||
|
description = "Cloudflare API token with DNS edit permissions."
|
||||||
type = string
|
type = string
|
||||||
sensitive = true
|
sensitive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "pve_api_url" { type = string }
|
variable "pve_api_url" {
|
||||||
|
description = "Proxmox VE API endpoint URL."
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
variable "pve_token" {
|
variable "pve_token" {
|
||||||
|
description = "Proxmox VE API token in 'user@realm!tokenid=secret' format."
|
||||||
type = string
|
type = string
|
||||||
sensitive = true
|
sensitive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "node_name" { type = string } # e.g. "pve"
|
variable "node_name" {
|
||||||
variable "datastore_id" { type = string } # e.g. "local-lvm"
|
description = "Proxmox node to deploy resources on (e.g. 'pve')."
|
||||||
variable "bridge" { type = string } # e.g. "vmbr0"
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
variable "template_vmid" { type = number } # VMID of your template
|
variable "datastore_id" {
|
||||||
variable "vm_id" { type = number } # VMID to assign
|
description = "Proxmox datastore for VM/container disks (e.g. 'local-lvm')."
|
||||||
variable "name" { type = string }
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
variable "ssh_pubkey_path" { type = string } # e.g. "~/.ssh/id_ed25519.pub"
|
variable "bridge" {
|
||||||
|
description = "Proxmox network bridge for VM/container NICs (e.g. 'vmbr0')."
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "template_vmid" {
|
||||||
|
description = "VMID of the Proxmox VM template to clone."
|
||||||
|
type = number
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "vm_id" {
|
||||||
|
description = "VMID to assign to the new VM."
|
||||||
|
type = number
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "name" {
|
||||||
|
description = "Name for the VM."
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "ssh_pubkey_path" {
|
||||||
|
description = "Path to the SSH public key file (e.g. '~/.ssh/id_ed25519.pub')."
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
variable "admin_username" {
|
variable "admin_username" {
|
||||||
|
description = "Admin username for provisioned VMs."
|
||||||
type = string
|
type = string
|
||||||
default = "azureuser"
|
default = "azureuser"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "azure_location" {
|
variable "azure_location" {
|
||||||
|
description = "Azure region for resource deployment."
|
||||||
type = string
|
type = string
|
||||||
default = "westeurope"
|
default = "westeurope"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "azure_subscription_id" {
|
variable "azure_subscription_id" {
|
||||||
|
description = "Azure subscription ID to deploy resources into."
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "allowed_ssh_cidrs_ipv4" {
|
variable "allowed_ssh_cidrs_ipv4" {
|
||||||
type = list(string)
|
|
||||||
description = "IPv4 CIDRs allowed to SSH (22/tcp). Empty list means allow from anywhere."
|
description = "IPv4 CIDRs allowed to SSH (22/tcp). Empty list means allow from anywhere."
|
||||||
|
type = list(string)
|
||||||
default = []
|
default = []
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user