You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new attributes to OnCall outgoing webhook (#1147)
* add new fields to ResourceOutgoingWebhook
* bump amixr-api-go-client to v0.0.11
* go generate
* tweak test
* refactor IntegrationFilter create/update
* use OnCallClient.Webhooks for datasource
-`authorization_header` (String, Sensitive) The auth data of the webhook. Used in Authorization header instead of user/password auth.
34
34
-`data` (String) The data of the webhook.
35
-
-`forward_whole_payload` (Boolean) Forwards whole payload of the alert to the webhook's url as POST data.
35
+
-`forward_whole_payload` (Boolean) Toggle to send the entire webhook payload instead of using the values in the Data field.
36
+
-`headers` (String) Headers to add to the outgoing webhook request.
37
+
-`http_method` (String) The HTTP method used in the request made by the outgoing webhook. Defaults to `POST`.
38
+
-`integration_filter` (List of String) Restricts the outgoing webhook to only trigger if the event came from a selected integration. If no integrations are selected the outgoing webhook will trigger for any integration.
39
+
-`is_webhook_enabled` (Boolean) Controls whether the outgoing webhook will trigger or is ignored. The default is `true`.
36
40
-`password` (String, Sensitive) The auth data of the webhook. Used for Basic authentication
37
41
-`team_id` (String) The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the `grafana_oncall_team` datasource.
38
-
-`user` (String) The auth data of the webhook. Used for Basic authentication.
42
+
-`trigger_template` (String) A template used to dynamically determine whether the webhook should execute based on the content of the payload.
43
+
-`trigger_type` (String) The type of event that will cause this outgoing webhook to execute. The types of triggers are: `escalation`, `alert group created`, `acknowledge`, `resolve`, `silence`, `unsilence`, `unresolve`, `unacknowledge`. Defaults to `escalation`.
44
+
-`user` (String) Username to use when making the outgoing webhook request.
Description: "Forwards whole payload of the alert to the webhook's url as POST data.",
68
+
Description: "Toggle to send the entire webhook payload instead of using the values in the Data field.",
69
+
},
70
+
"trigger_type": {
71
+
Type: schema.TypeString,
72
+
Optional: true,
73
+
Description: "The type of event that will cause this outgoing webhook to execute. The types of triggers are: `escalation`, `alert group created`, `acknowledge`, `resolve`, `silence`, `unsilence`, `unresolve`, `unacknowledge`.",
74
+
Default: "escalation",
75
+
},
76
+
"http_method": {
77
+
Type: schema.TypeString,
78
+
Optional: true,
79
+
Description: "The HTTP method used in the request made by the outgoing webhook.",
80
+
Default: "POST",
81
+
},
82
+
"trigger_template": {
83
+
Type: schema.TypeString,
84
+
Optional: true,
85
+
Description: "A template used to dynamically determine whether the webhook should execute based on the content of the payload.",
86
+
},
87
+
"headers": {
88
+
Type: schema.TypeString,
89
+
Optional: true,
90
+
Description: "Headers to add to the outgoing webhook request.",
91
+
},
92
+
"integration_filter": {
93
+
Type: schema.TypeList,
94
+
Elem: &schema.Schema{Type: schema.TypeString},
95
+
Optional: true,
96
+
Description: "Restricts the outgoing webhook to only trigger if the event came from a selected integration. If no integrations are selected the outgoing webhook will trigger for any integration.",
97
+
},
98
+
"is_webhook_enabled": {
99
+
Type: schema.TypeBool,
100
+
Optional: true,
101
+
Description: "Controls whether the outgoing webhook will trigger or is ignored. The default is `true`.",
69
102
},
70
103
},
71
104
}
@@ -79,11 +112,11 @@ func ResourceOutgoingWebhookCreate(ctx context.Context, d *schema.ResourceData,
0 commit comments