Terraform AzureRM Set Diff Analyzer

Terraform AzureRM Set Diff Analyzer

Analyzes Terraform plan JSON for the AzureRM provider to separate false-positive order-only diffs in Set attributes from real resource changes.

Skill files6 files

references/

scripts/

SKILL.md49 lines
1
---
2
name: terraform-azurerm-set-diff-analyzer
3
description: 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.
4
license: MIT
5
---
6
7
# Terraform AzureRM Set Diff Analyzer
8
9
A skill to identify "false-positive diffs" in Terraform plans caused by AzureRM Provider's Set-type attributes and distinguish them from actual changes.
10
11
## When to Use
12
13
- `terraform plan` shows many changes, but you only added/removed a single element
14
- Application Gateway, Load Balancer, NSG, etc. show "all elements changed"
15
- You want to automatically filter false-positive diffs in CI/CD
16
17
## Background
18
19
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.
20
21
These "false-positive diffs" don't actually affect the resources, but they make reviewing terraform plan output difficult.
22
23
## Prerequisites
24
25
- Python 3.8+
26
27
If Python is unavailable, install via your package manager (e.g., `apt install python3`, `brew install python3`) or from [python.org](https://www.python.org/downloads/).
28
29
## Basic Usage
30
31
```bash
32
# 1. Generate plan JSON output
33
terraform plan -out=plan.tfplan
34
terraform show -json plan.tfplan > plan.json
35
36
# 2. Analyze
37
python scripts/analyze_plan.py plan.json
38
```
39
40
## Troubleshooting
41
42
- **`python: command not found`**: Use `python3` instead, or install Python
43
- **`ModuleNotFoundError`**: Script uses only standard library; ensure Python 3.8+
44
45
## Detailed Documentation
46
47
- [scripts/README.md](scripts/README.md) - All options, output formats, exit codes, CI/CD examples
48
- [references/azurerm_set_attributes.md](references/azurerm_set_attributes.md) - Supported resources and attributes
49

Ā© awesome-copilot contributors Ā· MIT Ā· source Ā· posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0Ā followers Ā· 14,621Ā prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…