sentry_metric_alert doesn't track owner attribute
Closed this issue · 1 comments
buzztaiki commented
Changing the owner of sentry_metric_alert
does not trigger any changes in the plan or apply.
Steps to reproduce
- Apply the following terraform configuration.
data "sentry_organization" "this" {
slug = var.organization_slug
}
resource "random_id" "project" {
byte_length = 8
}
resource "sentry_team" "this" {
organization = data.sentry_organization.this.slug
name = "test-${random_id.project.hex}"
slug = "test-${random_id.project.hex}"
}
resource "sentry_project" "this" {
organization = data.sentry_organization.this.slug
name = "test-${random_id.project.hex}"
teams = [sentry_team.this.slug]
slug = "test-${random_id.project.hex}"
platform = "other"
default_rules = false
}
resource "sentry_metric_alert" "this" {
organization = data.sentry_organization.this.slug
project = sentry_project.this.slug
name = "alert"
dataset = "events"
event_types = ["error"]
query = "event.type:error"
aggregate = "count()"
time_window = 60
threshold_type = 0
resolve_threshold = 0
owner = "team:${sentry_team.this.internal_id}"
trigger {
label = "critical"
alert_threshold = 100
threshold_type = 0
}
}
- Change it as follows and plan
diff --git a/main.tf b/main.tf
index 50bbafd..7411437 100644
--- a/main.tf
+++ b/main.tf
@@ -32,7 +32,7 @@ resource "sentry_metric_alert" "this" {
time_window = 60
threshold_type = 0
resolve_threshold = 0
- owner = "team:${sentry_team.this.internal_id}"
+ # owner = "team:${sentry_team.this.internal_id}"
trigger {
label = "critical"
- The plan result shows no changes
...
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.
buzztaiki commented
The environment
attribute had the same problem.