Azure / aztfexport

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

Cannot export te resource group using hcl-only and non-interactive flag #544

Closed rajesh-ms closed 4 months ago

rajesh-ms commented 4 months ago

Just used the simple command: aztfexport rg --non-interactive --hcl-only

Recevied following error: rror: Failed to import /subscriptions//resourceGroups//providers/Microsoft.ApiManagement/service//subscriptions/master as azurerm_api_management_subscription.res-65: exit status 1

Error: parsing scope into product/ api id "/subscriptions//resourceGroups//providers/Microsoft.ApiManagement/service//": parsing "/subscriptions//resourceGroups//providers/Microsoft.ApiManagement/service//": parsing the Api ID: the number of segments didn't match

Expected a Api ID that matched (containing 10 segments):

/subscriptions//resourceGroups/example-resource-group/providers/Microsoft.ApiManagement/service/serviceValue/apis/apiIdValue

However this value was provided (which was parsed into 0 segments):

/subscriptions//resourceGroups//providers/Microsoft.ApiManagement/service//

The following Segments are expected:

The following Segments were parsed:

Any suggestion, anything missing ?

magodo commented 4 months ago

Hi @rajesh-ms, this duplicates to https://github.com/Azure/aztfexport/issues/444, please subscribe that for any update!