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

Error: Failed to import providers/Microsoft.Storage/storageAccounts/ #525

Open diepes opened 2 months ago

diepes commented 2 months ago

aztfexport -v aztfexport version v0.14.1(f492475)

Running:

aztfexport query \
    --output-dir="$out_dir" \
    --subscription-id="$AZTFEXPORT_SUBSCRIPTION_ID" \
    --provider-name="azurerm" \
    --provider-version="3.99.0" \
    -n "resourceGroup =~ '$AZTFEXPORT_RG'"

it starts fine ⣾ Initializing ... ⣾ Listing resources ⣾ Importing resources ...

Completes Importing for 35/36 and then fails with Error:

Error: Failed to import /subscriptions/23...96/resourceGroups/dev-bp-rg/providers/Microsoft.Storage/storageAccounts/bpshare as azurerm_storage_account.res-35: exit status 1

Error: retrieving queue properties for Storage Account (Subscription: "23...96"
Resource Group Name: "dev-bp-rg"
Storage Account Name: "bpshare"): unmarshalling response: could not parse response body
magodo commented 2 months ago

@diepes Could you please try manually import this resource via terraform import? If the issue remains, then please submit an issue in the upstream repo: https://github.com/hashicorp/terraform-provider-azurerm/issues/new/choose