| name | terraform |
| description | Terraform infrastructure-as-code reference for HCL syntax, state management,
module design, and provider configuration. Use when working with Terraform
configurations (.tf files), running terraform commands, troubleshooting state
issues, or designing modules. Includes Telmate Proxmox provider patterns.
Triggers: terraform, tfstate, .tf files, HCL, modules, providers, proxmox_vm_qemu.
|
| agent | terraform-expert |
Terraform Skill
Infrastructure-as-code reference for Terraform configurations, state management, and provider patterns.
Quick Reference
terraform init
terraform validate
terraform fmt -recursive
terraform plan
terraform apply
terraform state list
terraform state show <resource>
terraform graph | dot -Tsvg > graph.svg
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:
Validation Checklist
Before terraform apply:
Variable Precedence
(highest to lowest)
-var flag: terraform apply -var="name=value"
-var-file flag: terraform apply -var-file=prod.tfvars
*.auto.tfvars files (alphabetically)
terraform.tfvars file
TF_VAR_* environment variables
- Variable defaults in
variables.tf