You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we're importing a whole resource group full of resources, aztfexport presently applies a res-### name to the resource. The ### is taken from a numeric value based on the order in which the resource appears.
For example - let's say I've got a resource group named Network, with one vnet, an NSG with five rules, and a subnet. It names the Terraform resources as:
azurerm_resource_group.res-0
azurerm_virtual_network.res-1
azurerm_network_security_group.res-2
azurerm_network_security_rule.res-3
azurerm_network_security_rule.res-4
azurerm_network_security_rule.res-5
azurerm_network_security_rule.res-6
azurerm_network_security_rule.res-7
azurerm_subnet.res-8
Instead of res-###, could the resource name be pulled from the name of the resource itself? e.g. the if the subnet is named Admin, instead of azurerm_subnet.res-8, it should be azurerm_subnet.Admin.
If there are duplicate names, it could use the Azure region as a disambiguation - for example if the Admin subnet exists in two vnets, one in East and one in West, it would have azurerm_subnet.Admin and azurerm_subnet.Admin-West.
This would make it easier to navigate the resources in the future - we could standardize and set dependencies based on names rather than having to pinpoint sequentially import-numbered resources.
The text was updated successfully, but these errors were encountered:
If we're importing a whole resource group full of resources, aztfexport presently applies a res-### name to the resource. The ### is taken from a numeric value based on the order in which the resource appears.
For example - let's say I've got a resource group named Network, with one vnet, an NSG with five rules, and a subnet. It names the Terraform resources as:
Instead of res-###, could the resource name be pulled from the name of the resource itself? e.g. the if the subnet is named Admin, instead of azurerm_subnet.res-8, it should be azurerm_subnet.Admin.
If there are duplicate names, it could use the Azure region as a disambiguation - for example if the Admin subnet exists in two vnets, one in East and one in West, it would have azurerm_subnet.Admin and azurerm_subnet.Admin-West.
This would make it easier to navigate the resources in the future - we could standardize and set dependencies based on names rather than having to pinpoint sequentially import-numbered resources.
The text was updated successfully, but these errors were encountered: