我想从azure门户导入可用性测试。
根据文档https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_metric_alert,它说要使用terraform import azurerm_monitor_metric_alert.main /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.Insights/metricAlerts/example-metricalert
我使用的命令是terraform import azurerm_monitor_metric_alert.this /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Insights/metricAlerts/example metric alert test-appinsightsname
我的问题是我的可用性名称有点不同:示例度量警报测试应用程序洞察力。
这是我得到的错误,命令需要两个参数。
发布于 2022-06-01 06:06:38
经过几次尝试,我发现解决方案是在可用性名称有多个名称时添加""
解决方案:
terraform import azurerm_monitor_metric_alert.this "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Insights/metricAlerts/example metric alert test-appinsightsname"https://stackoverflow.com/questions/72457133
复制相似问题