Skip to content

Add terraform-azurerm-set-diff-analyzer skill#620

Merged
aaronpowell merged 3 commits intogithub:mainfrom
torumakabe:add-terraform-azurerm-set-diff-analyzer
Feb 2, 2026
Merged

Add terraform-azurerm-set-diff-analyzer skill#620
aaronpowell merged 3 commits intogithub:mainfrom
torumakabe:add-terraform-azurerm-set-diff-analyzer

Conversation

@torumakabe
Copy link
Contributor

Summary

Add a new skill that analyzes Terraform plan JSON output for AzureRM Provider to distinguish between false-positive diffs (order-only changes in Set-type attributes) and actual resource changes.

Problem

When working with Azure resources that use Set-type attributes (like Application Gateway, Load Balancer, NSG, etc.), terraform plan often shows all elements as "changed" even when you only added or removed a single element. This is because Terraform's Set type compares by position rather than by key.

These "false-positive diffs" don't actually affect the resources, but they make reviewing terraform plan output difficult and can cause confusion in CI/CD pipelines.

Solution

This skill identifies and categorizes changes in Set-type attributes:

Category Meaning Action
🟢 Order-only False-positive diff, no actual change Safe to ignore
🟡 Actual change Set element added/removed/modified Review the content
🔴 Resource replacement delete + create Check for downtime impact

Skill Repository

https://github.com/torumakabe/terraform-azurerm-set-diff-analyzer

Bundled Assets

  • references/azurerm_set_attributes.json - Set-type attribute definitions for AzureRM resources
  • references/azurerm_set_attributes.md - Human-readable documentation
  • scripts/analyze_plan.py - Python analyzer script

Checklist

  • Skill follows the Agent Skills specification
  • SKILL.md has proper frontmatter
  • Entry added to docs/README.skills.md in alphabetical order
  • Repository is public

Copilot AI review requested due to automatic review settings January 29, 2026 10:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new entry to the skills index for a Terraform/AzureRM “set diff” analyzer intended to help interpret Terraform plan JSON output and distinguish order-only diffs from real changes.

Changes:

  • Added a terraform-azurerm-set-diff-analyzer row to docs/README.skills.md, including a link and a list of bundled assets.

| [refactor](../skills/refactor/SKILL.md) | Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements. | None |
| [scoutqa-test](../skills/scoutqa-test/SKILL.md) | This skill should be used when the user asks to "test this website", "run exploratory testing", "check for accessibility issues", "verify the login flow works", "find bugs on this page", or requests automated QA testing. Triggers on web application testing scenarios including smoke tests, accessibility audits, e-commerce flows, and user flow validation using ScoutQA CLI. IMPORTANT: Use this skill proactively after implementing web application features to verify they work correctly - don't wait for the user to ask for testing. | None |
| [snowflake-semanticview](../skills/snowflake-semanticview/SKILL.md) | Create, alter, and validate Snowflake semantic views using Snowflake CLI (snow). Use when asked to build or troubleshoot semantic views/semantic layer definitions with CREATE/ALTER SEMANTIC VIEW, to validate semantic-view DDL against Snowflake via CLI, or to guide Snowflake CLI installation and connection setup. | None |
| [terraform-azurerm-set-diff-analyzer](https://github.com/torumakabe/terraform-azurerm-set-diff-analyzer/blob/main/.github/skills/terraform-azurerm-set-diff-analyzer/SKILL.md) | 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. | `references/azurerm_set_attributes.json`<br />`references/azurerm_set_attributes.md`<br />`scripts/analyze_plan.py` |
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This table entry doesn’t appear to correspond to a skill included in this repo: there is no skills/terraform-azurerm-set-diff-analyzer/ folder, and unlike all other entries it links out to an external GitHub URL. Also, the “Bundled Assets” column lists files that aren’t present under a local skill folder, which conflicts with this doc’s own definition that skills are “self-contained folders” in skills/.

Suggested fix: add the skill folder and assets under skills/terraform-azurerm-set-diff-analyzer/ and update the link to ../skills/terraform-azurerm-set-diff-analyzer/SKILL.md (and keep bundled asset paths relative to that folder), or if external skills are intended to be listed here, update the README to explicitly support external skills and avoid listing local bundled-asset paths for them.

Copilot uses AI. Check for mistakes.
@torumakabe torumakabe force-pushed the add-terraform-azurerm-set-diff-analyzer branch 4 times, most recently from faecb20 to 269534f Compare January 29, 2026 10:29
Add a new skill that analyzes Terraform plan JSON output for AzureRM Provider
to distinguish between false-positive diffs (order-only changes in Set-type
attributes) and actual resource changes.

This skill helps users identify 'noise' in terraform plan output caused by
Azure API returning Set elements in different order, making plan reviews
easier and reducing confusion in CI/CD pipelines.

Bundled assets:
- references/azurerm_set_attributes.json
- references/azurerm_set_attributes.md
- scripts/analyze_plan.py
@torumakabe torumakabe force-pushed the add-terraform-azurerm-set-diff-analyzer branch from 269534f to 1b9ff37 Compare January 29, 2026 10:33
Copy link
Contributor

@aaronpowell aaronpowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wanting to confirm, the .gitignore included in this is to ensure that running the analyze_plan.py script won't accidentally add files to the repo that are artifacts of running the script.

Also, the skill makes the assumption that Python is installed on the machine, I'd recommend some troubleshooting advice in the skill on how to handle if it's unavailable or if the script is unsuccessful.

@torumakabe
Copy link
Contributor Author

@aaronpowell Thank you for the review!

the .gitignore included in this is to ensure that running the analyze_plan.py script won't accidentally add files to the repo

Yes, exactly. It prevents Python artifacts (pycache/, .pyc files, virtual environments, etc.) from being committed when developing or running the script locally.

I'd recommend some troubleshooting advice in the skill on how to handle if it's unavailable or if the script is unsuccessful

Added Prerequisites and Troubleshooting sections to SKILL.md in a6f3cde. The script also returns meaningful exit codes (0-3) and writes errors to stderr, so coding agents can handle failures programmatically.

@aaronpowell aaronpowell merged commit 44a43b2 into github:main Feb 2, 2026
2 checks passed
@torumakabe torumakabe deleted the add-terraform-azurerm-set-diff-analyzer branch February 2, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants