Azure / aztfexport

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

any command to skip some specific resource to be exported #452

Closed rizkyfaza20 closed 1 year ago

rizkyfaza20 commented 1 year ago

I'm having a steps on Azure DevOps on to export some resource group, anyhow i try the way that should be to export on Azure DevOps until I got a throwback of error while exporting :

``[aztfexport] 2023/09/13 04:58:00 DeInitializing...
Error: Failed to import /subscriptions/<subscriptionId>/resourceGroups/rg-somerg-dev/providers/Microsoft.ApiManagement/service/apim-hhtp-dev/subscriptions/master as azurerm_api_management_subscription.res-64: exit status 1

Error: parsing scope into product/ api id "/subscriptions/<subscriptionId>/resourceGroups/rg-somerg-dev/providers/Microsoft.ApiManagement/service/apim-hhtp-dev/": ID was missing the apis element``

I wanted to skip this resource which is the ApiManagement to skip while exported, is it any command on how to do it? I already check on the docs which that use Azure Query of Azure Graph, but it will took a lot of line while do some export. Really need a help, cheers.

magodo commented 1 year ago

You can use the --continue option to allw it to continue on error.

About this specific error, please take a look at: https://github.com/Azure/aztfexport/issues/444

rizkyfaza20 commented 1 year ago

thanks it help my case