We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 071b228 commit 358914dCopy full SHA for 358914d
docs/resources/metric_alert.md
@@ -95,13 +95,13 @@ resource "sentry_metric_alert" "main" {
95
96
Required:
97
98
+- `action` (Block List, Min: 1) (see [below for nested schema](#nestedblock--trigger--action))
99
- `alert_threshold` (Number)
100
- `label` (String)
101
- `threshold_type` (Number)
102
103
Optional:
104
-- `action` (Block List) (see [below for nested schema](#nestedblock--trigger--action))
105
- `resolve_threshold` (Number)
106
107
Read-Only:
internal/provider/provider.go
@@ -111,8 +111,8 @@ func (p *SentryProvider) Resources(ctx context.Context) []func() resource.Resour
111
func (p *SentryProvider) DataSources(ctx context.Context) []func() datasource.DataSource {
112
return []func() datasource.DataSource{
113
NewAllClientKeysDataSource,
114
- NewAllProjectsDataSource,
115
NewAllOrganizationMembersDataSource,
+ NewAllProjectsDataSource,
116
NewClientKeyDataSource,
117
NewIssueAlertDataSource,
118
NewOrganizationDataSource,
sentry/data_source_sentry_metric_alert_test.go
@@ -45,7 +45,7 @@ func TestAccSentryMetricAlertDataSource_basic(t *testing.T) {
45
resource.TestCheckResourceAttrPair(dn, "owners", rn, "owners"),
46
resource.TestCheckResourceAttr(dn, "trigger.#", "2"),
47
resource.TestCheckResourceAttrPair(dn, "triggers.0", rn, "triggers.0"),
48
- resource.TestCheckResourceAttr(dn, "trigger.0.action.#", "0"),
+ resource.TestCheckResourceAttr(dn, "trigger.0.action.#", "1"),
49
resource.TestCheckResourceAttrPair(dn, "triggers.1", rn, "triggers.1"),
50
resource.TestCheckResourceAttr(dn, "trigger.1.action.#", "1"),
51
testAccCheckSentryMetricAlertExists(rnCopy, &alertCopyID),
@@ -85,6 +85,12 @@ resource "sentry_metric_alert" "test" {
85
resolve_threshold = 100.0
86
87
trigger {
88
+ action {
89
+ type = "email"
90
+ target_type = "team"
91
+ target_identifier = sentry_team.test.internal_id
92
+ }
93
+
94
alert_threshold = 1000
label = "critical"
sentry/resource_sentry_metric_alert.go
@@ -107,7 +107,7 @@ func resourceSentryMetricAlert() *schema.Resource {
},
108
"action": {
109
Type: schema.TypeList,
110
- Optional: true,
+ Required: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
sentry/resource_sentry_metric_alert_test.go
@@ -134,7 +134,6 @@ resource "sentry_metric_alert" "test" {
134
type = "email"
135
target_type = "team"
136
target_identifier = sentry_team.test.internal_id
137
- integration_id = 32
138
}
139
140
@@ -144,6 +143,12 @@ resource "sentry_metric_alert" "test" {
144
143
145
146
147
148
149
150
151
152
alert_threshold = 500
153
label = "warning"
154
0 commit comments