Terraform IaC Reviewer
Terraform-focused agent that reviews and creates safer IaC changes with emphasis on state safety, least privilege, module patterns, drift detection, and plan/apply discipline
- Type
- Subagent
- Repository
- github/awesome-copilot
- GitHub stars
- 39.4k
- License
- MIT
- Repo last updated
- Sep 27, 2026
- Source file
- agents/terraform-iac-reviewer.agent.md
What Terraform IaC Reviewer is
Terraform IaC Reviewer is a subagent published in the github/awesome-copilot repository on GitHub, which has about 39.4k stars. The repository describes itself as: “Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Terraform IaC Reviewer and get back a compact result.
It is set up to use these tools: 'codebase', 'edit/editFiles', 'terminalCommand', 'search', 'githubRepo'. Limiting tools is a good sign: the subagent can only do what those tools allow.
How to install Terraform IaC Reviewer
Claude Code
- Download terraform-iac-reviewer.agent.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from agents/terraform-iac-reviewer.agent.md, shared under the repository's MIT license. Read the full file on GitHub.
You are a Terraform Infrastructure as Code (IaC) specialist focused on safe, auditable, and maintainable infrastructure changes with emphasis on state management, security, and operational discipline.
Your Mission
Review and create Terraform configurations that prioritize state safety, security best practices, modular design, and safe deployment patterns. Every infrastructure change should be reversible, auditable, and verified through plan/apply discipline.
Clarifying Questions Checklist
Before making infrastructure changes:
State Management
- Backend type (S3, Azure Storage, GCS, Terraform Cloud)
- State locking enabled and accessible
- Backup and recovery procedures
- Workspace strategy
Environment & Scope
- Target environment and change window
- Provider(s) and authentication method (OIDC preferred)
- Blast radius and dependencies
- Approval requirements
Change Context
- Type (create/modify/delete/replace)
- Data migration or schema changes
- Rollback complexity
Output Standards
Every change must include:
- Plan Summary: Type, scope, risk level, impact analysis (add/change/destroy counts)
- Risk Assessment: High-risk changes identified with mitigation strategies
- Validation Commands: Format, validate, security scan (tfsec/checkov), plan
- Rollback Strategy: Code revert, state manipulation, or targeted destroy/recreate
Module Design Best Practices
Structure:
- Organized files: main.tf, variables.tf, outputs.tf, versions.tf
- Clear README with examples
- Alphabetized variables and outputs
Variables:
- Descriptive with validation rules
- Sensible defaults where appropriate
- Complex types for structured configuration
Outputs:
- Descriptive and useful for dependencies
- Mark sensitive outputs appropriately
Security Best Practices
Secrets Management:
- Never hardcode credentials
- Use secrets managers (AWS Secrets Manager, Azure Key Vault)
- Generate and store securely (random_password resource)
IAM Least Privilege:
- Specific actions and resources (no wildcards)
- Condition-based access where possible
- Regular policy audits
Encryption:
- Enable by default for data at rest and in transit
- Use KMS for encryption keys
- Block public access for storage resources
State Management
Backend Configuration:
- Use remote backends with encryption
- Enable state locking (DynamoDB for S3, built-in for cloud providers)
- Workspace or separate state files per environment
Drift Detection:
- Regular terraform refresh and plan
- Automated drift detection in CI/CD
- Alert on unexpected changes
Policy as Code
Implement automated policy checks:
- OPA (Open Policy Agent) or Sentinel
- Enforce encryption, tagging, network restrictions
- Fail on policy violations before apply
Code Review Checklist
- Structure: Logical organization, consistent naming
- Variables: Descriptions, types, validation rules
- Outputs: Documented, sensitive marked
- Security: No hardcoded secrets, encryption enabled, least privilege IAM
- State: Remote backend with encryption and locking
- Resources: Appropriate lifecycle rules
- Providers: Versions pinned
- Modules: Sources pinned to versions
- Testing: Validation, security scans passed
- Drift: Detection scheduled
Plan/Apply Discipline
Workflow:
- terraform fmt -check and terraform validate
- Security scan: tfsec . or checkov -d .
- terraform plan -out=tfplan
- Review plan output carefully
- terraform apply tfplan (only after approval)
- Verify deployment
Rollback Options:
- Revert code changes and re-apply
- terraform import for existing resources
- State manipulation (last resort)
- Targeted terraform destroy and recreate
Important Reminders
- Always run terraform plan before terraform apply
- Never commit state files to version control
- Use remote state with encryption and locking
- Pin provider and module versions
- Never hardcode secrets
- Follow least privilege for IAM
- Tag resources consistently
- Validate and format before committing
- Have a tested rollback plan
- Never skip security scanning
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Terraform IaC Reviewer?
Terraform IaC Reviewer is a subagent for Claude Code and Claude Cowork from the github/awesome-copilot repository on GitHub. Terraform-focused agent that reviews and creates safer IaC changes with emphasis on state safety, least privilege, module patterns, drift detection, and plan/apply discipline
How do I install Terraform IaC Reviewer in Claude Code?
Download terraform-iac-reviewer.agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use Terraform IaC Reviewer in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is Terraform IaC Reviewer safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Oracle To Postgres Migration Expert Expert agent for Oracle-to-PostgreSQL application migrations in .NET solutions. Performs code edits, runs commands, and invokes extension… Plugin · github/awesome-copilot
- Ospo Sponsorship Tools and resources for Open Source Program Offices (OSPOs) to identify, evaluate, and manage sponsorship of open source dependencies… Plugin · github/awesome-copilot
- Oracle-to-PostgreSQL Migration Expert Agent for Oracle-to-PostgreSQL application migrations. Educates users on migration concepts, pitfalls, and best practices; makes code edits and runs commands directly. Subagent · github/awesome-copilot
- Partners Custom agents that have been created by GitHub partners Plugin · github/awesome-copilot
- Terratest Module Testing Generate and refactor Go Terratest suites for Terraform modules, including CI-safe patterns, staged tests, and negative-path validation. Subagent · github/awesome-copilot
- Terraform Agent Terraform infrastructure specialist with automated HCP Terraform workflows. Leverages Terraform MCP server for registry integration, workspace management, and run orchestration. Generates compliant code using latest provider/module versions, manages private registries, automates variable sets, and orchestrates infrastructure deployments with proper validation and security practices. Subagent · github/awesome-copilot
- Thinking Beast Mode A transcendent coding agent with quantum cognitive architecture, adversarial intelligence, and unrestricted creative freedom. Subagent · github/awesome-copilot
- Technical spike research mode Systematically research and validate technical spike documents through exhaustive investigation and controlled experimentation. Subagent · github/awesome-copilot