Azure / Azure/aztfexport

Option to not export unchanged default values and read only parameters

Open
#676 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
Go
Stars
1.9k
Forks
221
Avg merge
15h 43m
Merged PRs (30d)
9

Description

I used aztfexport to export resources from an Azure resource group with only a handful of resources. However I was quite surprised to see that it created nearly 600 configuration blocks. The reason was, that one of the resources was a simple postresql flexible server.

My coding agent explained:

> Each azurerm_postgresql_flexible_server_configuration maps to one server parameter — things like DateStyle, TimeZone, allow_alter_system, max_connections, etc. A PostgreSQL Flexible Server exposes ~500-600 tunable server parameters, and every one is a distinct Azure resource (.../configurations/{paramName}).
>
> aztfexport works by enumerating every resource ID returned by Azure Resource Graph and emitting one Terraform block per ID. Since Azure surfaces every server parameter as its own addressable resource — whether or not you ever changed it from its default — the exporter faithfully generates a block for each.
> Most of those 592 are set to their default values, so managing them in Terraform is pure noise...

Therefor I think it would be a nice feature if aztfexport would not export configuration parameters like this, which are either unchanged from their default or which are readonly and not manageable by terraform.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing aztfexport's Azure resource enumeration and Terraform block generation for PostgreSQL Flexible Server configurations. Determine how unchanged defaults and read-only parameters can be identified, then verify that exports omit those entries while retaining changed, Terraform-manageable parameters and reducing the generated configuration noise.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go, terraform
Domain
cloud, infrastructure, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.