Skip to content

Commit

Permalink
azurerm_monitor_scheduled_query_rules_alert_v2 - Fix `criteria.oper…
Browse files Browse the repository at this point in the history
…ator` Enum (hashicorp#19594)

Resolves hashicorp#19581
  • Loading branch information
teowa authored and favoretti committed Jan 12, 2023
1 parent bf2ae22 commit dcad11b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
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

0 comments on commit dcad11b

Please sign in to comment.