Closed phillipuniverse closed 4 months ago
This might be a problem with multiple filters? I modified my config to remove the level >= error
filter and now I correctly get no changes:
resource "rollbar_notification" "pd_high_occurrence" {
provider = rollbar.notifications_provider
channel = "pagerduty"
rule {
trigger = "occurrence_rate"
filters {
type = "rate"
period = 300 # value in seconds, 5m
count = 75
}
}
config {
service_key = var.pd_service_key
}
}
Same here (for Slack notifications for occurrence_rate
with multiple triggers). Adding count = 0
and period = 0
to additional filters doesn't help.
@phillipuniverse and @alinazabara. I know this is an old issue and a difficult one to solve. The issue is indeed with the ordering of the filters; since this is the list, the order matters. The problem is documented here
While its not perfect, our API returns type=level as the last filter, so if you switch the order in the terraform file then it will mitigate the problem - you won't see any differences
Here is an example:
resource "rollbar_notification" "pd_high_occurrence" {
channel = "pagerduty"
rule {
trigger = "occurrence_rate"
filters {
type = "rate"
period = 300 # value in seconds, 5m
count = 75
}
filters {
type = "level"
operation = "gte"
value = "error"
}
}
config {
service_key = "some_key"
}
}
Here is my terraform configuration:
It seems like every time I run a
terraform plan
this results in changes that are not actually changes, but only with thepd_high_occurrence
resource.On the first apply, I see the notifications created in the Rollbar project UI. When I re-run it, it detects the following difference:
I don't really understand what's going on here or what the change it's detecting, it looks the same?