Skip to content
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

Unable to import azurerm_monitor_scheduled_query_rules_alert #212

Closed
mochja opened this issue Sep 6, 2022 · 2 comments
Closed

Unable to import azurerm_monitor_scheduled_query_rules_alert #212

mochja opened this issue Sep 6, 2022 · 2 comments
Labels
bug Something isn't working upstream-aztft

Comments

@mochja
Copy link

mochja commented Sep 6, 2022

Hello,

I was unable to import azurerm_monitor_scheduled_query_rules_alert resource using

aztfy version v0.6.0(18b614b)
aztfy resource -f '/subscriptions/D5CCAED7-D6BE-4ACF-A028-59369C7012CE/resourceGroups/my-rg/providers/microsoft.insights/scheduledqueryrules/Rule name with spaces'
Resource Type: azurerm_monitor_scheduled_query_rules_alert

...

Error: failed to import /subscriptions/D5CCAED7-D6BE-4ACF-A028-59369C7012CE/resourceGroups/my-rg/providers/Microsoft.Insights/scheduledqueryrules/Rule name with spaces as azurerm_monitor_scheduled_query_rules_alert.res-0: exit status 1
Error: parsing Resource ID "/subscriptions/D5CCAED7-D6BE-4ACF-A028-59369C7012CE/resourceGroups/my-rg/providers/Microsoft.Insights/scheduledqueryrules/Rule name with spaces": ID was missing the `scheduledQueryRules` element

I found this fix: https://github.com/hashicorp/terraform-provider-azurerm/pull/17932/files

But I am not able to convince the azcli to use scheduledQueryRules instead of scheduledqueryrules

@magodo
Copy link
Collaborator

magodo commented Sep 7, 2022

@mochja Thank you for submitting this! The issue is already detected and fixed at: magodo/aztft@aee4039#diff-612a386b491da3c67f6b96706d95ff5aea2bb99d91b01bf68c922444c967fccdL6890-R7008, which is already included in the current main branch. I'll make a new release soon so that users don't need to build from the main branch.

@magodo magodo added bug Something isn't working upstream-aztft labels Sep 7, 2022
@magodo magodo closed this as completed Sep 28, 2022
@magodo
Copy link
Collaborator

magodo commented Sep 28, 2022

This has been fixed in v0.7.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream-aztft
Projects
None yet
Development

No branches or pull requests

2 participants