review-terraform

Review Terraform diffs and Azure plans for safe infrastructure changes.

801|25|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/learntocloud/learn-to-cloud-app --skill review-terraform
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-terraform
Source: https://github.com/learntocloud/learn-to-cloud-app/tree/main/.github/skills/review-terraform
Command: npx skills add https://github.com/learntocloud/learn-to-cloud-app --skill review-terraform

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Merging Terraform changes without verifying the plan against real Azure state can cause unexpected resource destruction, replacements, or permission failures. This Skill guides a structured review of Terraform diffs and Azure-backed plans before approving a merge.

Core Features & Use Cases

  • Plan Safety Verification: Confirms every planned action matches the intended diff and flags unexpected destroys, replacements, identity, auth, networking, or data changes.
  • Azure Resource Handling: Ensures default-created Azure resources are updated or imported rather than recreated, and recommends azapi_update_resource for Function App authsettingsV2.
  • Identity & Permission Checks: Validates that the GitHub Actions deployment identity has required Azure RBAC and Microsoft Graph permissions for azuread_* resources.
  • Use Case: Before merging a pull request that modifies Terraform for an Azure Container Apps deployment, use this Skill to verify the plan contains no unintended resource recreation and that the CI identity has sufficient permissions.

Quick Start

Ask the AI to review the Terraform changes in this pull request for plan safety and deployment-identity permissions before merging.

Frequently Asked Questions about review-terraform

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

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

Review the diff alongside an Azure-backed plan, confirming every planned action matches the intended change. Check for unexpected destroys, replacements, identity, networking, or data changes, and verify formatting, validation, and tests pass.

How to check if a Terraform plan will destroy Azure resources?

Compare the plan output against the intended diff and flag any destroy or replacement actions not explicitly expected. Never infer safety from terraform validate alone, since it does not evaluate plan actions against real state.

What permissions does GitHub Actions need for Terraform Azure deployments?

The GitHub Actions identity needs the required Azure RBAC roles for the managed resources, plus Microsoft Graph permissions when managing azuread_* resources. Verify these before merging to avoid deployment failures.

How do I update Function App authsettingsV2 in Terraform without recreation?

Use azapi_update_resource to update the existing authsettingsV2 child resource rather than recreating it. This avoids disruptive replacement of the Function App authentication configuration.

Do Terraform provider or lock-file updates change infrastructure?

Provider and lock-file-only updates should produce no infrastructure changes. Verify the plan is empty for such updates; any planned actions indicate an unintended side effect requiring investigation.