Closed rosilva-85 closed 5 months ago
Seems that is not supported here:
So I think is an enhancement in this case, not a bug
You want to use the trigger_action
.
I have tried to use trigger_action, with no luck.
Is there any working example with trigger action to execute an external_webhook?
oncall 1.3.29
resource "grafana_oncall_escalation" "test" { provider = grafana.oncall escalation_chain_id = grafana_oncall_escalation_chain.test.id action_to_trigger = grafana_oncall_outgoing_webhook.test.id type = "trigger_action" position = 0 }
400 {action_to_trigger: [Object does not exist]}
Maybe it's a version issue ?
If you import the resource with terraform import, the type on the on call api is: "type": "trigger_webhook"
I've also tried to do it via API, but doesn't work:
{"escalation_chain_id":["Object does not exist"],"action_to_trigger":["Object does not exist"]}%
I have the same error using the API directly, I opened a support ticket. It seems to be an issue with the API itself.
When receiving a helpful response I will inform you guys.
any update on this?
hi there 👋 please try upgrading to 2.15.0
which was just released. trigger_webhook
should be the correct type
value for your use case here. let me know if you still face this issue.
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Add an escalation step to call a outgoing webhook, as I can do on the ui.
Actual Behavior
The option is not available on the provider, so it breaks. If I do an import of the pre prexisting object, terraform detects it as trigger_webhook
"provider": "provider[\"registry.terraform.io/grafana/grafana\"].cloud", "instances": [ { "schema_version": 0, "attributes": { "action_to_trigger": "", "duration": 0, "escalation_chain_id": "FSN1R71", "group_to_notify": "", "id": "EWWYXWYV", "important": false, "notify_if_time_from": "", "notify_if_time_to": "", "notify_on_call_from_schedule": "", "persons_to_notify": [], "persons_to_notify_next_each_time": [], "position": 3, "type": "trigger_webhook" }
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
Try to create an escalation step based on an outgoing webhook with terraform