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

azurerm_monitor_scheduled_query_rules_alert_v2 - Fix criteria.operator Enum #19594

Merged
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 @@ -114,7 +114,8 @@ func (r ScheduledQueryRulesAlertV2Resource) Arguments() map[string]*pluginsdk.Sc
Type: pluginsdk.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
string(scheduledqueryrules.ConditionOperatorEquals),
// see https://github.com/Azure/azure-rest-api-specs/issues/21794
"Equal",
string(scheduledqueryrules.ConditionOperatorGreaterThan),
string(scheduledqueryrules.ConditionOperatorGreaterThanOrEqual),
string(scheduledqueryrules.ConditionOperatorLessThan),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ resource "azurerm_monitor_scheduled_query_rules_alert_v2" "test" {
QUERY
time_aggregation_method = "Count"
threshold = 5.0
operator = "GreaterThan"
operator = "Equal"
}
}
`, template, data.RandomInteger, data.Locations.Primary)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ An `action` block supports the following:

A `criteria` block supports the following:

* `operator` - (Required) Specifies the criteria operator. Possible values are `Equals`, `GreaterThan`, `GreaterThanOrEqual`, `LessThan`,and `LessThanOrEqual`.
* `operator` - (Required) Specifies the criteria operator. Possible values are `Equal`, `GreaterThan`, `GreaterThanOrEqual`, `LessThan`,and `LessThanOrEqual`.

* `query` - (Required) The query to run on logs. The results returned by this query are used to populate the alert.

Expand Down