Skip to content

Update defaults and fix setting of some 0 values.#52

Closed
zscholl wants to merge 2 commits intosplunk:masterfrom
zscholl:zscholl/saved-search-defaults
Closed

Update defaults and fix setting of some 0 values.#52
zscholl wants to merge 2 commits intosplunk:masterfrom
zscholl:zscholl/saved-search-defaults

Conversation

@zscholl
Copy link
Contributor

@zscholl zscholl commented Feb 5, 2021

Description

When the values are Computed: true terraform ends up using false for boolean values and 0 for integer values. In some cases this is not the true default value when creating a saved search, so this produces behavior that's inconsistent with creating a new alert through the Splunk UI.

Changing these defaults here to match Splunk's defaults for saved searches.

This change also removes some omitempty tags for integer values when transforming the struct to url parameters. Go's behavior is to consider 0 as an empty value so if the integer was set to 0 the field was not being included in the POST request to Splunk. This made it impossible to set one of these values to 0.

This issue is similar to #35, but concerns integer values.

@zscholl zscholl force-pushed the zscholl/saved-search-defaults branch from 3a980f0 to b9585fc Compare February 22, 2021 22:03
@zscholl
Copy link
Contributor Author

zscholl commented Mar 18, 2021

👋 Hey @anushjay, anything I can do here to help get this merged?

@julada
Copy link

julada commented May 12, 2022

@micahkemp-splunk can we get this merged?

@rrossetti-splunk rrossetti-splunk mentioned this pull request Mar 17, 2026
@rrossetti-splunk
Copy link
Collaborator

resolved in #222
Thank you for your contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants