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

Importing Resource Groups Still Doesn't work #520

Open tsjake opened 2 months ago

tsjake commented 2 months ago

when I run aztfexport rg it tells me all the resources are skipped, additionally it only shows one resource despite there being 14 in the group. I tried the --use-azure-cli-cred flag and it tells me there's multiple resource groups defined.

This is with 0.14.1

stemaMSFT commented 2 months ago

Hey @tsjake what's the full command you're running?

tsjake commented 2 months ago

Hey @tsjake what's the full command you're running?

I ran: aztfexport rg and also --use-azure-cli-cred

I should add I can import single resources just fine.

stemaMSFT commented 2 months ago

if your command is aztfexport rg --use-azure-cli-cred myResourceGroup then this does just seem like a bug. Does running aztfexport query --use-azure-cli-cred --recursive "type =~ 'Microsoft.Resources/resourceGroups' and name =~ 'myResourceGroup'" solve the problem? Replace myResourceGroup with your RG of course.

magodo commented 2 months ago

@tsjake Can you please share the generated mapping file aztfexportResourceMapping.json?