terraform-provider-splunk icon indicating copy to clipboard operation
terraform-provider-splunk copied to clipboard

Add TimePeriodInSecBeforeTsidxReduction for Index

Open IPrototypeI opened this issue 2 years ago • 2 comments

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 avatar Jan 04 '23 20:01 IPrototypeI

@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 avatar Jan 13 '23 16:01 anushjay

@anushjay awesome I will go ahead and create a pullrequest for each of the features :)

IPrototypeI avatar Jan 15 '23 10:01 IPrototypeI