Skip to content

Commit f16e896

Browse files
authored
grafana_oncall_escalation resource - drop support for type = trigger_action + add support for type = trigger_webhook (#1467)
* wip escalation policy trigger_action * `go generate` output
1 parent 76bb2b3 commit f16e896

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/resources/oncall_escalation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ resource "grafana_oncall_escalation" "example_notify_step" {
6363

6464
### Optional
6565

66-
- `action_to_trigger` (String) The ID of an Action for trigger_action type step.
66+
- `action_to_trigger` (String) The ID of an Action for trigger_webhook type step.
6767
- `duration` (Number) The duration of delay for wait type step.
6868
- `group_to_notify` (String) The ID of a User Group for notify_user_group type step.
6969
- `important` (Boolean) Will activate "important" personal notification rules. Actual for steps: notify_persons, notify_on_call_from_schedule and notify_user_group
@@ -72,7 +72,7 @@ resource "grafana_oncall_escalation" "example_notify_step" {
7272
- `notify_on_call_from_schedule` (String) ID of a Schedule for notify_on_call_from_schedule type step.
7373
- `persons_to_notify` (Set of String) The list of ID's of users for notify_persons type step.
7474
- `persons_to_notify_next_each_time` (Set of String) The list of ID's of users for notify_person_next_each_time type step.
75-
- `type` (String) The type of escalation policy. Can be wait, notify_persons, notify_person_next_each_time, notify_on_call_from_schedule, trigger_action, notify_user_group, resolve, notify_whole_channel, notify_if_time_from_to, repeat_escalation
75+
- `type` (String) The type of escalation policy. Can be wait, notify_persons, notify_person_next_each_time, notify_on_call_from_schedule, trigger_webhook, notify_user_group, resolve, notify_whole_channel, notify_if_time_from_to, repeat_escalation
7676

7777
### Read-Only
7878

internal/resources/oncall/resource_escalation.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var escalationOptions = []string{
1919
"notify_persons",
2020
"notify_person_next_each_time",
2121
"notify_on_call_from_schedule",
22-
"trigger_action",
22+
"trigger_webhook",
2323
"notify_user_group",
2424
"resolve",
2525
"notify_whole_channel",
@@ -149,7 +149,7 @@ func resourceEscalation() *common.Resource {
149149
"notify_if_time_from",
150150
"notify_if_time_to",
151151
},
152-
Description: "The ID of an Action for trigger_action type step.",
152+
Description: "The ID of an Action for trigger_webhook type step.",
153153
},
154154
"group_to_notify": {
155155
Type: schema.TypeString,
@@ -268,7 +268,7 @@ func resourceEscalationCreate(ctx context.Context, d *schema.ResourceData, clien
268268

269269
actionToTriggerData, actionToTriggerDataOk := d.GetOk("action_to_trigger")
270270
if actionToTriggerDataOk {
271-
if typeData == "trigger_action" {
271+
if typeData == "trigger_webhook" {
272272
createOptions.ActionToTrigger = actionToTriggerData.(string)
273273
} else {
274274
return diag.Errorf("action to trigger can not be set with type: %s", typeData)
@@ -386,7 +386,7 @@ func resourceEscalationUpdate(ctx context.Context, d *schema.ResourceData, clien
386386

387387
actionToTriggerData, actionToTriggerDataOk := d.GetOk("action_to_trigger")
388388
if actionToTriggerDataOk {
389-
if typeData == "trigger_action" {
389+
if typeData == "trigger_webhook" {
390390
updateOptions.ActionToTrigger = actionToTriggerData.(string)
391391
}
392392
}

0 commit comments

Comments
 (0)