-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exporting API Management resource fails: "ID was missing the apis
element"
#459
Comments
apis
elementapis
element"
@MohnJadden I believe this should be fixed in the main branch. |
@magodo, I'm seeing the same issue on the latest version (aztfexport 0.14.0). Running
|
This is either a provider issue, or by design should not be imported. The issue only occurs for the master subscription, e.g. You can verify it by simply My suggestion is to submit an issue to the upstream provider repo. |
I created a series of resources in my Test-SnowflakeIntegration resource group via the portal. I wanted to export them via aztfexport and ran the following command:
./aztfexport rg --use-azure-cli-cred --non-interactive --hcl-only -o Snowflake Test-SnowflakeIntegration
The command starts and begins to export resources, but it eventually fails with the following error:
Error: parsing scope into product/ api id "/subscriptions/aaa-bbb-ccc-ddd/resourceGroups/Test-SnowflakeIntegration/providers/Microsoft.ApiManagement/service/test-snowflakeintegration-apim/": ID was missing the
apiselement
I tried logging back in via az login and re-running, but the issue still persists. The terraform.tf file generated by aztfexport just has the backend and required providers; no resources are present.
I enabled trace logging and observed the following error in the logs, right before the log I posted above:
2023-10-02T16:02:20.474-0400 [ERROR] aztfexport: aztfexport ends with error: Failed to import /subscriptions/aaa-bbb-ccc-ddd/resourceGroups/Test-SnowflakeIntegration/providers/Microsoft.ApiManagement/service/test-snowflakeintegration-apim/subscriptions/master as azurerm_api_management_subscription.res-65: exit status 1
The gist with the full trace log is at https://gist.github.com/MohnJadden/4db90e496771df6e3f23949408bdc207
Anything I can do to fix?
The text was updated successfully, but these errors were encountered: