Open joachimsmits opened 2 months ago
:wave: Thanks for taking the time to open this issue. Do you mind rechecking which version of the AzureRM Provider you are seeing this bug? Version 3.x of the provider only goes up to 3.116, thanks!
Installed hashicorp/azurerm v3.116.0 (signed by HashiCorp)
Is there an existing issue for this?
Community Note
Terraform Version
1.9.5
AzureRM Provider Version
v3.116.0
Affected Resource(s)/Data Source(s)
azurerm_monitor_metric_alert
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Create alert rule
Actual Behaviour
Error
Steps to Reproduce
No response
Important Factoids
Nope
References
When "Workaround" is added, it " works"...
resource "azurerm_monitor_metric_alert" "pip_ddos_or_not" { name = "smar-pip-ddos-or-not-${azurerm_public_ip.pip.name}" resource_group_name = var.resource_group scopes = [azurerm_public_ip.pip.id]
target_resource_type = "Microsoft.Network/publicIPAddresses" target_resource_location = var.location_full
frequency = "PT15M" window_size = "PT15M"
severity = local.severity
criteria { metric_namespace = "Microsoft.Network/publicIPAddresses" metric_name = "IfUnderDDoSAttack" aggregation = "Average" operator = "GreaterThan" threshold = lookup(var.thresholds, "smar-pip-ddos-or-not-${azurerm_public_ip.pip.name}", 0) }
dynamic "action" { for_each = local.action_groups
}
dynamic "action" { for_each = { for k in var.pagerduty : k => k if k == "smar-pip-ddos-or-not-${azurerm_public_ip.pip.name}" } content { action_group_id = data.azurerm_monitor_action_group.pagerduty-webhook.id webhook_properties = { Workaround = "applied" } } } }