Skip to content

Commit

Permalink
Change time_to_burn_entire_budget operator to lte (#112)
Browse files Browse the repository at this point in the history
A recent PR to nobl9-go (nobl9/nobl9-go#89) changed the required operator for time_to_burn_entire_budget to lte (from lt).
This PR reflects that change in the provider.
  • Loading branch information
nuusk committed Aug 2, 2023
1 parent 6ac2a6c commit 475c99e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nobl9/resource_alert_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ func marshalAlertConditions(d *schema.ResourceData) []n9api.AlertCondition {

measurement := condition["measurement"].(string)
op := "gte"
if measurement == "timeToBurnBudget" || measurement == "timeToBurnEntireBudget" {
if measurement == "timeToBurnBudget" {
op = "lt"
} else if measurement == "timeToBurnEntireBudget" {
op = "lte"
}

resultConditions[i] = n9api.AlertCondition{
Expand Down

0 comments on commit 475c99e

Please sign in to comment.