terraform-provider-splunk
terraform-provider-splunk copied to clipboard
splunk_indexes type fixes
This PR updates the splunk_indexes
resource to use the proper types, as defined by what is returned by the Splunk REST API.
While the REST documentation states that bucketRebuildMemoryHint
and repFactor
can be set by string value, they are always returned by the REST API as integers.
Additionally, repFactor
is returned as 0
when the index is configured for both repFactor = 0
and repFactor = auto
, making it impossible to differentiate between the two configured values. Because of this failure, and because that setting is only really valid on clustered indexes which should be configured by the Indexer Cluster Manager anyway, I've deprecated repFactor
.
These failures went unnoticed because JSON unmarshaling errors were ignored. The first commit in this PR handles errors returned when unmarshaling Index data, which otherwise triggers failing tests.
The CHANGELOG update bumps the version of the provider by a minor version, because there are some (minor) breaking changes.