terraform-provider-splunk
terraform-provider-splunk copied to clipboard
Add TimePeriodInSecBeforeTsidxReduction for Index
Adding new parameter for index creation.
Hello would it be possible to add following parameter TimePeriodInSecBeforeTsidxReduction as optional for index creation You just have to extend
type IndexObject
TimePeriodInSecBeforeTsidxReduction int
json:"timePeriodInSecBeforeTsidxReduction,omitempty" url:"timePeriodInSecBeforeTsidxReduction,omitempty"``
and getIndexConfig with
indexConfigObject.TimePeriodInSecBeforeTsidxReduction = d.Get("time_period_in_sec_before_tsidx_reduction").(int)
this would be the description
"time_period_in_sec_before_tsidx_reduction": { Type: schema.TypeInt, Optional: true, Computed: true, Description:
The amount of time, in seconds, between service runs to reduce the tsidx files for any buckets that have reached the age specified by
'timePeriodInSecBeforeTsidxReduction', },
and for the error handling
if err = d.Set("time_period_in_sec_before_tsidx_reduction", entry.Content.TimePeriodInSecBeforeTsidxReduction); err != nil { return err }
@IPrototypeI Would be a great addition. Do you mind creating a PR and adding the field to the existing test for indexes? I'm happy to review and merge the changes.
@anushjay awesome I will go ahead and create a pullrequest for each of the features :)