Terraform IaC Reviewer
Reviews and writes Terraform changes with a focus on state safety, least-privilege IAM, drift detection and a strict plan-before-apply discipline.
Overview
This agent treats every infrastructure change as something that must be
reversible, auditable and verified through plan/apply discipline before it
touches a Terraform-managed environment. It asks clarifying questions about
state management and blast radius before proposing any change.
How it works
- It checks the backend type and state locking setup, the target environment, and the blast radius of the change before writing any code.
- It expects organized files (
main.tf,variables.tf,outputs.tf), descriptive variables with validation rules, and pinned provider/module versions. - It flags hardcoded secrets, missing encryption at rest or in transit, and IAM policies that use wildcards instead of specific actions and resources.
- It pushes for a remote backend with locking, and recommends scheduled
terraform planruns to catch drift automatically. - The workflow runs
fmtandvalidate, then a security scan (tfsecorcheckov), thenplan, human review, and only thenapply, with a tested rollback option for every change.
Examples
"Review this module for state safety and least-privilege IAM before
we apply it to production."
Installation
You need VS Code with the GitHub Copilot extension.
- Create the agents folder and download the file into your repo:
mkdir -p .github/agents curl -o .github/agents/terraform-iac-reviewer.agent.md \ https://raw.githubusercontent.com/github/awesome-copilot/main/agents/terraform-iac-reviewer.agent.md - Reload VS Code, or open a new Copilot Chat; custom agents under
.github/agents/are picked up automatically. - Pick this agent from the mode picker in Copilot Chat and point it at a module to confirm it asks about state and blast radius first.
Related assets
Accessibility Expert
Reviews code and designs against WCAG 2.1/2.2, covering semantics, keyboard and focus behavior, forms, media and dynamic SPA updates, and ships framework-specific examples plus a CI setup for automated checks.
Address Comments Agent
Works through pull request review comments one at a time: applies the minimal fix for each, pushes back on comments that don't make sense, adds test coverage, and commits with a descriptive message before moving to the next comment.
ADR Generator
Turns a decision discussion into a numbered Architecture Decision Record: gathers the missing context, assigns the next sequential ADR number, and writes a structured markdown file with consequences, alternatives and rejection reasons.