Index of every page on this site: llms.txt
All skills
github avatar

/terraform-azurerm-set-diff-analyzer

@f10fdb8 official
by githubgithub/awesome-copilot41k stars
5,399
Run it yourself

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 changes.

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/terraform-azurerm-set-diff-analyzer

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈111 tokens for metadata: the name and description. ≈426 when used: this file. ≈3.6k more on demand in 3 files.

Description uses 5.5% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈444 characters, or 5.5%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2mo5 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill is a standard diagnostic utility for Terraform users. It consists of a standalone Python script and JSON configuration files used to analyze local Terraform plan data. It does not perform network operations, execute remote code, or require third-party dependencies.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

  • Runlayer9mo

    6/6 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at f10fdb8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 10 months ago
  • Python
  • terraform
  • azurerm
  • azure
  • plan
  • diff
  • set-types
  • ci-cd

README badge

README badge for github/awesome-copilot/terraform-azurerm-set-diff-analyzer

Filters false-positive diffs in Terraform plans for AzureRM resources caused by Set-type attribute reordering. Use when terraform plan shows widespread changes to Application Gateway, Load Balancer, NSG, or Firewall but you only modified a single element. Includes a Python script to parse plan JSON and distinguish spurious diffs from actual resource changes.

Generated from the current SKILL.md.

Does this work with all Terraform providers or just AzureRM?
It targets AzureRM Provider specifically. The skill focuses on Set-type attributes common in Azure resources like Application Gateway, Load Balancer, and NSG, though the underlying issue affects other providers too.
What does the script output?
It analyzes terraform plan JSON to identify false-positive diffs caused by Set reordering versus actual resource changes, helping you filter spurious changes in review and CI/CD workflows.
What are the Python requirements?
Python 3.8 or later. The script uses only the standard library, so no additional packages need to be installed.
Can this be integrated into CI/CD pipelines?
Yes. The skill includes exit codes and output formats designed for CI/CD integration; see scripts/README.md for examples.

Generated from the current SKILL.md. These answers refresh after source changes.