Azure / aztfexport

A tool to bring existing Azure resources under Terraform's management
https://azure.github.io/aztfexport/
Mozilla Public License 2.0
1.53k stars 174 forks source link

Fix cross RP parent-child dependency #505

Closed magodo closed 4 months ago

magodo commented 4 months ago

In https://github.com/Azure/aztfexport/pull/455, the armid package is updated to include the change https://github.com/magodo/armid/commit/7d1b8afd6ee1bc67d75176eb652579ecd31cd6be, which requires adoption in aztfexport to keep the cross rp parent-child dependencies.

E.g.

Before #455, and with this RP. We can get below when exporting a RG contains ACR:

resource "azurerm_container_registry" "res-1" {
  #...
  depends_on = [
    azurerm_resource_group.res-0,
  ]
}

But since #455 without this RP, we won't get the above depends_on.