Skip to content
Skillpedia
Deploy & cloud (DevOps)40k · #7449

terraform-azurerm-set-diff-analyzer

What it does

This tool analyzes Terraform plan output for Azure resources. It helps identify changes that look large but are actually minor or non-existent, caused by how some Azure resources handle lists of items.

When to use it

  • ✓When `terraform plan` shows many changes, but you only added or removed one item.
  • ✓When resources like Application Gateway or Load Balancer show 'all elements changed'.
  • ✓To automatically filter out false changes in automation processes (CI/CD).

Skill link

https://github.com/github/awesome-copilot/blob/main/skills/terraform-azurerm-set-diff-analyzer/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/terraform-azurerm-set-diff-analyzer/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Analyze my Terraform plan and tell me which changes are real and which are false.”

5 new skills a week. 1 minute to read.

How it works

The tool compares the Terraform plan output with a list of resources and attributes known to cause these 'false changes'. It focuses on 'Set' type attributes that cause ordering issues.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Terraform AzureRM Set Diff Analyzer

A skill to identify "false-positive diffs" in Terraform plans caused by AzureRM Provider's Set-type attributes and distinguish them from actual changes.

When to Use

  • terraform plan shows many changes, but you only added/removed a single element
  • Application Gateway, Load Balancer, NSG, etc. show "all elements changed"
  • You want to automatically filter false-positive diffs in CI/CD

Background

Terraform's Set type compares by position rather than by key, so when adding or removing elements, all elements appear as "changed". This is a general Terraform issue, but it's particularly noticeable with AzureRM resources that heavily use Set-type attributes like Application Gateway, Load Balancer, and NSG.

These "false-positive diffs" don't actually affect the resources, but they make reviewing terraform plan output difficult.

Prerequisites

  • Python 3.8+

If Python is unavailable, install via your package manager (e.g., apt install python3, brew install python3) or from python.org.

Basic Usage

# 1. Generate plan JSON output
terraform plan -out=plan.tfplan
terraform show -json plan.tfplan > plan.json

# 2. Analyze
python scripts/analyze_plan.py plan.json

Troubleshooting

  • python: command not found: Use python3 instead, or install Python
  • ModuleNotFoundError: Script uses only standard library; ensure Python 3.8+

Detailed Documentation

FAQ

What are 'false changes'?

These are changes that Terraform shows in the plan, but they don't actually alter the resource in Azure. This happens because the order of items in some lists is compared, not the content itself.

Do I need to install anything?

Yes, you need to have Python 3.8 or higher installed on your computer.

How do I use it?

First, generate the Terraform plan file (`terraform plan -out=plan.tfplan` and `terraform show -json plan.tfplan > plan.json`). Then, run the Python script with the generated file (`python scripts/analyze_plan.py plan.json`).

Details

Original description by the author

Analyze Terraform plan JSON output for AzureRM Provider to distinguish between false-positive diffs (order-only changes in Set-type attributes) and actual resource changes. Use when reviewing terraform plan output for Azure resources like Application Gateway, Load Balancer, Firewall, Front Door, NSG, and other resources with Set-type attributes that cause spurious diffs due to internal ordering ch

repo: github/awesome-copilot

Popularity

GitHub stars
40k
Ranking position
#7449
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills