iac-review

Review Terraform, Bicep, and CloudFormation code for security, state, and drift issues.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula --skill iac-review-serpro-workshop-fortaleza
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iac-review
Source: https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula/tree/main/.github/skills/iac-review
Command: npx skills add https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula --skill iac-review-serpro-workshop-fortaleza

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Infrastructure as Code reviews are inconsistent and error-prone: reviewers miss unpinned provider versions, local state without locking, hardcoded secrets, and silent configuration drift. This Skill provides a structured checklist and output template so every IaC review covers structure, remote state, security, change safety, and drift detection. ## Core Features & Use Cases - Structured review checklist: Covers module composability, remote state with locking, least-privilege IAM, encryption, pinned provider and module versions, and prevent_destroy on stateful resources. - Common findings catalog: Flags known anti-patterns such as count on reorderable lists, excessive depends_on, and environment branching via terraform.workspace string interpolation. - Standardized output template: Produces a findings table with area, severity, and recommendation, plus a blocking-findings count and an approve/request-changes verdict. - Use Case: A teammate opens a pull request adding a Terraform module for a storage account. Ask for an IaC review and receive a severity-ranked findings table catching public network access and an unpinned provider version before merge. ## Quick Start Review this Terraform module for security issues, state configuration, and drift risks, then give me a severity-ranked findings table with a verdict.

Frequently Asked Questions about iac-review

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

FAQPage Schema
How do I review Terraform code before merging a pull request?

Review Terraform by checking module structure, remote state with locking, secrets handling, pinned provider versions, and attaching terraform plan output to the PR. Run tfsec or checkov for automated security findings and require a second approval for destructive changes.

What should a Terraform code review checklist include?

A Terraform review checklist should cover composable modules with no hardcoded values, remote state with locking and per-environment separation, least-privilege IAM, encryption at rest and in transit, pinned provider and module versions, prevent_destroy on stateful resources, and required tags like project, environment, and owner.

How do I detect Terraform state drift automatically?

Detect drift by scheduling terraform plan with -detailed-exitcode daily or running Driftctl. Each detected drift should automatically create a ticket rather than stay silent, and manual console changes should always be codified afterward.

Does this review approach work for Bicep and CloudFormation?

Yes, the same review areas apply to Bicep and CloudFormation: structure, state or deployment safety, security, change safety, and drift. Tooling differs, with PSRule covering Bicep checks while tfsec and checkov target Terraform.

Why is using count on lists a problem in Terraform?

Using count on lists that can be reordered causes Terraform to destroy and recreate resources when positions shift. Use for_each with stable keys instead so each resource maps to a persistent identity.