terraform-review

Review Terraform plans and HCL for destructive changes, state hygiene, and security misconfigurations.

15|3|Updated Jul 9, 2026
One-click install
npx skills add https://github.com/thefear078/cursor-kit-for-ai --skill terraform-review-thefear078
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: terraform-review
Source: https://github.com/thefear078/cursor-kit-for-ai/tree/main/plugins/devops/skills/terraform-review
Command: npx skills add https://github.com/thefear078/cursor-kit-for-ai --skill terraform-review-thefear078

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Terraform changes that look safe in a diff can destroy and recreate databases, volumes, or buckets on apply. This Skill reviews the actual plan output alongside the HCL so destructive replacements, state risks, and security gaps are caught before terraform apply runs. ## Core Features & Use Cases - Plan-First Review: Triage every resource action (+, ~, -/+, -) from terraform plan output, flagging destroy-and-replace on stateful resources as blockers. - State & Safety Checklist: Verify remote backends with locking, per-environment state separation, prevent_destroy lifecycle rules, and deletion_protection on databases. - Security & Hygiene Audit: Detect secrets in .tf/.tfvars, open 0.0.0.0/0 security groups, wildcard IAM policies, and missing tags or version pins. - Use Case: Before merging an infrastructure PR, run the review to confirm the plan shows no unexpected replacements on the production RDS instance and that state is encrypted and locked. ## Quick Start Review this Terraform plan output and the changed .tf files, and tell me whether it is safe to apply.

Frequently Asked Questions about terraform-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a Terraform plan before applying?▼

Run terraform plan -out=tfplan and triage every resource action symbol: + creates, ~ updates in place, -/+ destroys and recreates, and - destroys. Any -/+ replacement on stateful resources like databases or buckets is a blocker until explicitly justified.

Why does terraform plan want to destroy and recreate my resource?▼

Replacement happens when a changed attribute forces it, marked with '# forces replacement' in the plan, or when a resource is renamed. Use moved blocks or terraform state mv for renames, and identify the forcing attribute before applying.

How should Terraform remote state be configured for teams?▼

Use a remote backend such as S3 with DynamoDB locking, GCS, or Terraform Cloud with encryption enabled, and keep terraform.tfstate out of git. Separate state per environment so staging mistakes cannot affect production.

What Terraform security issues should a code review catch?▼

Check for secrets in .tf or .tfvars files, security groups with 0.0.0.0/0 ingress beyond public load balancer ports 80/443, IAM policies with wildcard actions, and public endpoints that are not intentional. Mark sensitive outputs and encrypt state since it contains secrets.

When is Terraform overkill for infrastructure?▼

For single-VPS projects, a simple setup script often beats a module tree, and the review should say so. Terraform pays off when you manage multiple environments, reusable modules, or team-shared state.