@@ -65,6 +65,12 @@ var outgoingWebhookSchema = map[string]*schema.Schema{
6565 Optional : true ,
6666 Default : false ,
6767 },
68+ "on_incident_reopened" : {
69+ Description : "Whether to trigger webhook when incident is reopened. Only when `trigger_type=incident_change`." ,
70+ Type : schema .TypeBool ,
71+ Optional : true ,
72+ Default : false ,
73+ },
6874 "custom_webhook_template_attributes" : {
6975 Description : "Custom webhook template configuration." ,
7076 Type : schema .TypeList ,
@@ -143,6 +149,7 @@ type outgoingWebhook struct {
143149 OnIncidentStarted * bool `json:"on_incident_started,omitempty"`
144150 OnIncidentAcknowledged * bool `json:"on_incident_acknowledged,omitempty"`
145151 OnIncidentResolved * bool `json:"on_incident_resolved,omitempty"`
152+ OnIncidentReopened * bool `json:"on_incident_reopened,omitempty"`
146153 CustomWebhookTemplateAttributes * customWebhookTemplateAttributes `json:"custom_webhook_template_attributes,omitempty"`
147154 TeamName * string `json:"team_name,omitempty"`
148155}
@@ -158,7 +165,7 @@ func validateOutgoingWebhook(ctx context.Context, d *schema.ResourceDiff, m inte
158165 triggerType := d .Get ("trigger_type" ).(string )
159166
160167 // Validate incident_change specific fields
161- incidentFields := []string {"on_incident_started" , "on_incident_acknowledged" , "on_incident_resolved" }
168+ incidentFields := []string {"on_incident_started" , "on_incident_acknowledged" , "on_incident_resolved" , "on_incident_reopened" }
162169
163170 for _ , field := range incidentFields {
164171 if value , ok := d .GetOk (field ); ok && value .(bool ) {
@@ -209,6 +216,7 @@ func outgoingWebhookRef(in *outgoingWebhook, triggerType string) []struct {
209216 {k : "on_incident_started" , v : & in .OnIncidentStarted },
210217 {k : "on_incident_acknowledged" , v : & in .OnIncidentAcknowledged },
211218 {k : "on_incident_resolved" , v : & in .OnIncidentResolved },
219+ {k : "on_incident_reopened" , v : & in .OnIncidentReopened },
212220 }... )
213221 }
214222 return refs
0 commit comments