| name | terraform-plan |
| description | Use when asked to plan, apply, or review Terraform/OpenTofu changes. Also triggers for state management questions, provider errors, workspace issues, or any infrastructure-as-code workflow in this project.
|
| license | MIT |
Terraform/OpenTofu — safe change workflow
Golden rule
Always plan before apply. Always verify workspace before either.
tofu workspace show
tofu workspace list
Standard workflow
tofu init -backend-config=backend-<env>.hcl
tofu plan -var-file=vars-<env>.tfvars -out=tfplan-<env>
tofu show tfplan-<env>
tofu apply tfplan-<env>
Plan output symbols
| Symbol | Meaning | Action |
|---|
+ green | Resource created | Safe |
~ yellow | Modified in place | Review |
- red | Destroyed | Stop and confirm |
-/+ | Destroyed + recreated | Stop — this is disruptive |
State management
tofu state list
tofu state show aws_eks_cluster.main
tofu state mv old_address new_address
tofu state rm <address>
Common errors
State lock: another apply is running or crashed.
tofu force-unlock <lock-id>
Provider version mismatch: tofu init -upgrade
Backend auth failure: check TF_HTTP_PASSWORD env var and Bento service status.
Required env vars
export AWS_PROFILE=<profile>
export AWS_REGION=us-east-1
export TF_HTTP_PASSWORD=<bento-token>