splunk / terraform-provider-splunk

Terraform Provider for Splunk
Mozilla Public License 2.0
104 stars 78 forks source link

Is it possible to handle add on actions for saved searches #131

Open Tr1gs opened 2 years ago

Tr1gs commented 2 years ago

This seems related to https://github.com/splunk/terraform-provider-splunk/issues/88

I'm attempting to use the provider to create alerts that use the http alert action https://splunkbase.splunk.com/app/5022/

but if I attempt to configure it I get errors like

An argument named "action_httpalert_param_endpoint" is not expected here

Looking at the code https://github.com/splunk/terraform-provider-splunk/blob/master/client/models/saved_searches.go#L14:L153 it seems these labels are hardcoded rather than allowing for something like action_<action_name>_<parameter>.

dpavlov-smartling commented 2 years ago

I have similar case with Opsgenie actions. If I try to use the following code

    action_opsgenie = 1
    action_opsgenie_param_api_url = XXXXXXXXXXXXX

Terraform shows:

Error: Unsupported argument

  on alert.tf line 40, in resource "splunk_saved_searches" "saved_search_opsgenie":
  40:     action_opsgenie = 1

An argument named "action_opsgenie" is not expected here.

Error: Unsupported argument

  on alert.tf line 41, in resource "splunk_saved_searches" "saved_search_opsgenie":
  41:     action_opsgenie_param_api_url = "XXXXXXXXXXXXX"

An argument named "action_opsgenie_param_api_url" is not expected here.