Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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?

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.

2 participants