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