- Home
- Skills
- DevOps & Cloud
- terraform-iac-reviewer-v2
Terraform Iac Reviewer v2
Pre-apply Terraform gate. 50+ checks: security (S3/IAM), cost (oversized/untagged), CIS compliance, best practices.
Free
Works with the AI tools you already use
terraform-iac-reviewer-v2
Example session with this skill installed
Audit my AWS Terraform files in the ./intra folder. Check for security risks and give me a cost estimate.
- Read your context and instructions
- Compiled the terraform-iac-reviewer-v2
Scan Complete: 22 issues found.
- CRITICAL: S3 bucket 'prod-data' is public.
- MAJOR: NAT Gateway in every subnet (waste).
- COST: Estimated $12,800/yr savings possible by rightsizing EC2.
Verdict: BLOCK.
Connects securely to your tools. The creator never sees your data.
About this skill
Terraform IaC Reviewer
"Works in staging, breaks in prod" usually means someone forgot to add a tag, used a public S3 bucket, or hardcoded a secret. This skill is the pre-apply gate that catches all of that.
What it does
A complete IaC audit covering:
- Security (20 checks) — public S3, open security groups, IAM wildcards, unencrypted storage, secrets in code
- Cost (12 checks) — oversized instances, missing tags, no lifecycle, always-on resources
- Best practices (18 checks) — state management, module hygiene, naming, drift
- Compliance (10 checks) — CIS benchmarks, SOC2 controls, GDPR
Works with: Terraform, OpenTofu, Pulumi, CloudFormation, CDK.
When to use it
- You're about to
terraform applyand want a pre-flight check - Your security team wants CIS compliance for all IaC
- Your cloud bill spiked and you need to find waste in code
- You're scaling Terraform across teams and need consistent standards
- You want a CI gate that blocks bad PRs
Why it's better than ad-hoc prompting
Most "review my Terraform" prompts give generic advice. This skill is different:
- 50+ concrete checks — not vibes
- Multi-tool — Terraform, OpenTofu, Pulumi, CloudFormation
- CI-ready — exit codes, JSON output, SARIF
- Auto-fixable — many findings include the corrected HCL
- Compliance mapping — CIS / SOC2 / GDPR
Architecture
┌─────────────────────────────────────────────────────────┐
│ Agent (Claude/Cursor) │
│ - Reads .tf / .yaml / .ts / .py files │
│ - Calls audit script │
│ - Synthesizes report with fix list │
└───────────────┬─────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ skills/terraform-iac-reviewer/ │
│ scripts/ │
│ ├── audit.py # 50+ checks │
│ ├── detect_provider.py # Identify tool │
│ ├── check_drift.py # Compare state vs code │
│ ├── cost_estimate.py # Rough $ from instance types│
│ ├── cis_compliance.py # CIS benchmark mapping │
│ └── fix_suggestions.py # Auto-fix for common issues │
│ references/ │
│ ├── checks-catalog.md # All 50+ checks detailed │
│ ├── cis-mapping.md │
│ ├── cost-playbook.md │
│ └── state-mgmt.md │
└─────────────────────────────────────────────────────────┘
Quick start
# 1. Install
pip install hcl2 pyyaml
# 2. Audit Terraform / OpenTofu
python scripts/audit.py ./infra/ --tool terraform
# 3. Audit CloudFormation
python scripts/audit.py ./cfn/ --tool cloudformation
# 4. Audit Pulumi (TypeScript or Python)
python scripts/audit.py ./pulumi/ --tool pulumi
# 5. Detect drift between state and code
python scripts/check_drift.py --state terraform.tfstate --code ./
# 6. Cost estimate
python scripts/cost_estimate.py ./infra/
# 7. CIS compliance report
python scripts/cis_compliance.py ./infra/ --framework cis-aws-1.5
# 8. Get auto-fix suggestions
python scripts/fix_suggestions.py audit-report.json
The 50+ checks (categories)
Security (20)
- S3 bucket public (acl = "public-read") → BLOCK
- S3 bucket without encryption
- S3 bucket without versioning
- S3 bucket without access logging
- Security group with 0.0.0.0/0 ingress on SSH/RDP
- Security group with 0.0.0.0/0 egress
- IAM policy with
Action: "*"andResource: "*" - IAM role with broad trust policy
- RDS instance publicly accessible
- RDS without encryption at rest
- Lambda function with admin role
- Secrets in env vars / plaintext
- KMS key with no rotation
- CloudFront without WAF
- API Gateway without authentication
- SQS without encryption
- SNS topic without encryption
- EFS without encryption at rest
- EBS volume unencrypted
- OpenSearch / Elasticsearch public endpoint
Cost (12)
- EC2 instance over-sized for workload
- Instance without Savings Plans / Reserved
- EBS volume over-provisioned IOPS
- S3 bucket without lifecycle policy
- CloudWatch log group without retention
- Always-on resources in dev/staging
- Missing
tags(cost allocation broken) - NAT Gateway in every subnet
- Unused Elastic IPs
- Unattached EBS volumes
- Old snapshots (>90 days unused)
- Lambda over-provisioned memory
Best practices (18)
- State file in repo (not remote backend)
- State in local file without encryption
- No remote state locking
- Hardcoded region in resources
- No
.terraform.lock.hcl - Module pinned to floating version
- Count vs for_each misuse
- Inline vs separate variable file
- Missing
lifecycle { prevent_destroy = true }on critical resources - No
data "aws_caller_identity"for account ID - IAM policy attached directly to user (not role)
- Random ID not used in resource names
- Untagged resources
- No output for important values
- Variable without
descriptionandtype - Sensitive values not marked
- No
required_providersblock terraform { required_version }missing
Compliance (10)
- CIS AWS 1.5 / 2.0 benchmarks
- SOC2 CC6.1 (logical access)
- SOC2 CC7.2 (system monitoring)
- GDPR data residency
- HIPAA encryption controls
- PCI-DSS logging requirements
- Tagging for compliance
- Resource inventory
- Change management (git history)
- Audit trail (CloudTrail enabled)
Sample output
## Terraform Audit — ./infra/
**Files scanned**: 47
**Total checks**: 60
**Pass**: 38 | **Fail**: 22
**Critical**: 5 | **Major**: 9 | **Minor**: 8
### ❌ Critical (BLOCK)
- S3 bucket `prod-data-lake` has `acl = "public-read"` (CIS 2.1.5)
Fix: Remove `acl` and use bucket policy with explicit deny
- Security group `web-sg` allows 0.0.0.0/0 ingress on port 22 (CIS 4.1)
Fix: Restrict to known IPs or remove SSH ingress
- IAM policy `admin-policy` has `Action: "*"` + `Resource: "*"`
Fix: Replace with specific actions + scoped resources
- RDS instance `prod-db` is publicly accessible
Fix: Set `publicly_accessible = false`
- S3 bucket `customer-uploads` has no encryption
Fix: Add `server_side_encryption_configuration` block
### ⚠️ Major
- 3 EC2 instances over-sized (m5.4xlarge but avg CPU 8%)
- 2 S3 buckets without lifecycle policy
- NAT Gateway in every subnet ($0.045/hr × 4 = $130/mo wasted)
### 💡 Minor
- 8 resources missing `tags` (cost allocation broken)
- Variables missing `description` and `type`
### 💰 Estimated annual cost
- Current: $48,200/yr
- After fixes: $35,400/yr (saving $12,800/yr)
### Verdict: 🛑 BLOCK deploy
Pricing
Single-purchase, lifetime access. $10.00.
Includes:
- 6 Python audit scripts
- 4 reference docs (checks catalog, CIS mapping, cost playbook, state mgmt)
- 50+ check library
- CIS AWS 1.5 / 2.0 compliance pack
- Future updates for the same major version
Example usage
"Audit our AWS Terraform. Block any critical issues. Estimate cost savings."
The skill will:
- Parse all .tf files
- Run 50+ checks
- Identify CIS / SOC2 / GDPR compliance gaps
- Estimate cost from instance types
- Output
audit-report.mdwith fix list
Compatibility
Works with any agent that supports the SKILL.md standard and can execute Python: Claude Code, OpenClaw, Codex CLI, Cursor, Gemini CLI, Cline, Windsurf, Aider. Supports Terraform 0.13+, OpenTofu 1.0+, Pulumi (TS/Py/Go), CloudFormation YAML/JSON, CDK. Tested on Linux, macOS, Windows.
Tags
terraform, iac, opentofu, pulumi, cloudformation, devops, security, aws, gcp, azure
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
1 install
Downloaded by developers to date
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 3 months ago
- Free to download with an account