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

Add & Support Tags for Monitor-Scheduled-Query-Alert #119

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ resource "azurerm_monitor_scheduled_query_rules_alert_v2" "scheduled_query_rules
severity = each.value.severity
evaluation_frequency = each.value.evaluation_frequency
window_duration = each.value.window_duration
tags = merge(var.tags, { "enabled" : each.value.query_enabled })

action {
action_groups = each.value.action_group_id_list
Expand Down Expand Up @@ -65,6 +66,7 @@ resource "azurerm_monitor_scheduled_query_rules_alert_v2" "count_trigger_schedul
severity = each.value.severity
evaluation_frequency = each.value.evaluation_frequency
window_duration = each.value.window_duration
tags = merge(var.tags, { "enabled" : each.value.query_enabled })

action {
action_groups = each.value.action_group_id_list
Expand Down
6 changes: 6 additions & 0 deletions modules/azurerm/Monitor-Scheduled-Query-Alert/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,9 @@ variable "count_trigger_query_rules_alert" {
threshold = number
}))
}

variable "tags" {
description = "A mapping of tags to assign to the resource."
type = map(string)
default = {}
}
Loading