Skip to content

Commit 70580b2

Browse files
committed
removed failed location count variable, as it is not required
1 parent facc7dd commit 70580b2

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

infrastructure/modules/application-insights-availability-test/alerts.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ resource "azurerm_monitor_metric_alert" "this" {
1212
application_insights_web_test_location_availability_criteria {
1313
web_test_id = azurerm_application_insights_standard_web_test.this.id
1414
component_id = var.application_insights_id
15-
failed_location_count = var.alert.failed_location_count
15+
failed_location_count = 2
1616
}
1717

1818
description = var.alert.description

infrastructure/modules/application-insights-availability-test/variables.tf

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ variable "alert" {
135135
description = optional(string, "Availability test alert")
136136
frequency = optional(string, "PT1M")
137137
window_size = optional(string, "PT5M")
138-
auto_mitigate = optional(bool)
139-
failed_location_count = optional(number, 2)
138+
auto_mitigate = optional(bool, true)
140139
})
141140

142141
validation {
@@ -155,10 +154,5 @@ variable "alert" {
155154
error_message = "Window size must be one of: PT1M, PT5M, PT15M, PT30M, PT1H, PT6H, PT12H, P1D"
156155
}
157156

158-
validation {
159-
condition = var.alert.failed_location_count >= 1 && var.alert.failed_location_count <= length(var.geo_locations)
160-
error_message = "The failed location count must be >= 1 and cannot exceed the number of configured geo locations."
161-
}
162-
163157
default = {}
164158
}

0 commit comments

Comments
 (0)