terraform
Installation
SKILL.md
Terraform Skill
Infrastructure-as-code reference for Terraform configurations, state management, and provider patterns.
Quick Reference
# Core workflow
terraform init # Initialize, download providers
terraform validate # Syntax validation
terraform fmt -recursive # Format HCL files
terraform plan # Preview changes
terraform apply # Apply changes
# Inspection
terraform state list # List resources in state
terraform state show <resource> # Show resource details
terraform graph | dot -Tsvg > graph.svg # Dependency graph
# Debug
TF_LOG=DEBUG terraform plan 2>debug.log
Core Workflow
init → validate → fmt → plan → apply
- init: Download providers, initialize backend
- validate: Check syntax and configuration validity
- fmt: Ensure consistent formatting
- plan: Preview what will change (review carefully)
- apply: Execute changes
Reference Files
Load on-demand based on task:
| Topic | File | When to Load |
|---|---|---|
| Troubleshooting | troubleshooting.md | Common errors, debugging |
| State | state-management.md | Backends, locking, operations |
| Modules | module-design.md | Module patterns, composition |
| Security | security.md | Secrets, state security |
| Proxmox Gotchas | proxmox/gotchas.md | Critical provider issues, workarounds |
| Proxmox Auth | proxmox/authentication.md | Provider config, API tokens |
| Proxmox VMs | proxmox/vm-qemu.md | proxmox_vm_qemu resource patterns |
| Proxmox Errors | proxmox/troubleshooting.md | Proxmox-specific errors |
| External | external-resources.md | Official docs, links |
Validation Checklist
Before terraform apply:
-
terraform initcompleted successfully -
terraform validatepasses -
terraform fmtapplied -
terraform planreviewed (check destroy/replace operations) - Backend configured correctly (for team environments)
- State locking enabled (if remote backend)
- Sensitive variables marked
sensitive = true - Provider versions pinned in
terraform.tf - No secrets in version control
- Blast radius assessed (what could break?)
Variable Precedence
(highest to lowest)
-varflag:terraform apply -var="name=value"-var-fileflag:terraform apply -var-file=prod.tfvars*.auto.tfvarsfiles (alphabetically)terraform.tfvarsfileTF_VAR_*environment variables- Variable defaults in
variables.tf
Related skills
More from poindexter12/waypoint
proxmox
|
21packer
|
13docker
|
11github-actions
|
11gh-issue-triage
Label taxonomy and triage workflow for GitHub issues. Defines type labels (bug/feature/enhancement/docs/chore), priority levels (critical/high/medium/low), status labels, and triage decision workflow. Use when categorizing and prioritizing issues.
9gh-issue-templates
Standardized GitHub issue templates for bugs, features, and tasks. Provides title formats, body structure, and required sections. Use when creating issues to ensure consistency. Includes copy-paste templates in templates/ directory.
9