terraform-provider-splunk: Failure to update splunk_saved_search

Steps to reproduce:

  1. Create a splunk_saved_searches resource
  2. Edit the resource
  3. Apply Changes
  4. Apply will fail with a 400 Error

Expected Result:

  • making changes to a splunk_saved_searches resource should correctly update the saved search

error output

Warning: Applied changes may be incomplete

The plan was created with the -target option in effect, so some changes
requested in the configuration may have been ignored and the output values may
not be fully updated. Run the following command to verify that no other
changes are pending:
    terraform plan

Note that the -target option is not suitable for routine use, and is provided
only for exceptional situations such as recovering from errors or mistakes, or
when Terraform specifically suggests to use it as part of an error message.


Error: Http Error: [400] 400 Bad Request {"messages":[{"type":"ERROR","text":"Argument \"schedule_priority\" is not supported by this handler."}]}

  on main.tf line 1, in resource "splunk_saved_searches" "default":
   1: resource "splunk_saved_searches" "default" {

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

We are facing the same error and the workaround we are using is to group alerts into a module and recreate (destroy & apply) if there are bigger changes.

I also have this issue. I made a basic saved search:

resource "splunk_saved_searches" "test_search" {
    cron_schedule                           = "0 * * * *"
    description                             = "Bad things happened"
    is_scheduled                            = true
    is_visible                              = true
    name                                    = "TestSearch"
    search                                  = <<-EOT
                                            my fun search was here
                                            EOT

    acl {
        app              = "search"
        can_change_perms = true
        can_share_app    = true
        can_share_global = true
        can_share_user   = true
        can_write        = true
        owner            = "jfelle"
        read             = [ "*",
        ]
        removable        = true
        sharing          = "app"
        write            = [
            "*",
        ]
    }
}

The added some alert actions and saw the problem

resource "splunk_saved_searches" "test_search" {
    action_slack_param_attachment           = "alert_link"
    action_slack_param_channel              = "#dev_null"
    action_slack_param_message              = "Bad things happened"
    actions                                 = "slack"
    alert_comparator                        = "greater than"
    alert_expires                           = "24h"
    alert_severity                          = 4
    cron_schedule                           = "0 * * * *"
    description                             = "Bad things happened"
    is_scheduled                            = true
    is_visible                              = true
    name                                    = "TestSearch"
    search                                  = <<-EOT
                                            my fun search was here
                                            EOT

    acl {
        app              = "search"
        can_change_perms = true
        can_share_app    = true
        can_share_global = true
        can_share_user   = true
        can_write        = true
        owner            = "jfelle"
        read             = [ "*",
        ]
        removable        = true
        sharing          = "app"
        write            = [
            "*",
        ]
    }
}

I am doing this from an admin role.