Understand the Terraform & OpenTofu Skill Response Contract
masterWhen using this skill, every response generated for Terraform or OpenTofu tasks is guaranteed to follow a specific structure to ensure safety and clarity. You should expect the following components in every response:
- Assumptions & version floor: Explicit declaration of the runtime (
terraformortofu), exact version, providers, state backend, execution path (local/CI/Cloud/Atlantis), and environment criticality. - Risk category addressed: Identification of risks such as identity churn, secret exposure, blast radius, CI drift, compliance gaps, state corruption, provider upgrade risk, or testing blind spots.
- Chosen remediation & tradeoffs: An explanation of the chosen solution and what was traded off.
- Validation plan: A set of exact commands (e.g.,
fmt -check,validate,plan -out, policy check) tailored to the specific runtime and risk level. - Rollback notes: Instructions on how to undo destructive or state-mutating changes and what evidence to retain.
Safety Warning: Never run a direct production apply without a reviewed plan artifact and approval. Never run terraform destroy without first running terraform plan -destroy and reviewing all resources (including implicit dependents) that will be deleted. Never use -auto-approve on a destroy command.