You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alerting fields should be Elastic durations, not Golang durations (#846)
* Alerting fields should be Elastic durations, not Golang durations
* Changelog
* PR feedback
* Ok golangci-lint
* Update internal/kibana/alerting.go
Co-authored-by: Antonio <[email protected]>
---------
Co-authored-by: Antonio <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-2
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
## [Unreleased]
2
2
3
-
### Changes
4
-
3
+
- Fix validation of `throttle`, and `interval` attributes in `elasticstack_kibana_alerting_rule` allowing all Elastic duration values ([#846](https://github.com./elastic/terraform-provider-elasticstack/pull/846))
5
4
- Fix boolean setting parsing for `elasticstack_elasticsearch_indices` data source. ([#842](https://github.com./elastic/terraform-provider-elasticstack/pull/842))
Description: "The check interval, which specifies how frequently the rule conditions are checked. The interval must be specified in seconds, minutes, hours or days.",
72
81
Type: schema.TypeString,
73
82
Required: true,
74
-
ValidateFunc: utils.StringIsDuration,
83
+
ValidateFunc: stringIsAlertingDuration(),
75
84
},
76
85
"actions": {
77
86
Description: "An action that runs under defined conditions.",
Description: "Defines how often an alert generates repeated actions. This custom action interval must be specified in seconds, minutes, hours, or days. For example, 10m or 1h. This property is applicable only if `notify_when` is `onThrottleInterval`. NOTE: This is a rule level property; if you update the rule in Kibana, it is automatically changed to use action-specific `throttle` values.",
Description: "Deprecated in 8.13.0. Defines how often an alert generates repeated actions. This custom action interval must be specified in seconds, minutes, hours, or days. For example, 10m or 1h. This property is applicable only if `notify_when` is `onThrottleInterval`. NOTE: This is a rule level property; if you update the rule in Kibana, it is automatically changed to use action-specific `throttle` values.",
199
208
Type: schema.TypeString,
200
209
Optional: true,
201
-
ValidateFunc: utils.StringIsDuration,
210
+
ValidateFunc: stringIsAlertingDuration(),
202
211
},
203
212
"scheduled_task_id": {
204
213
Description: "ID of the scheduled task that will execute the alert.",
0 commit comments