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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
1
## [Unreleased]
2
2
3
+
- Add the `alerts_filter` field to the `actions` in the Create Rule API ([#774](https://github.com/elastic/terraform-provider-elasticstack/pull/774))
3
4
- Add the `alert_delay` field to the Create Rule API ([#715](https://github.com/elastic/terraform-provider-elasticstack/pull/715))
4
5
- Add support for data_stream `lifecycle` template settings ([#724](https://github.com/elastic/terraform-provider-elasticstack/pull/724))
5
6
- Fix a provider panic when `elasticstack_kibana_action_connector` reads a non-existant connector ([#729](https://github.com/elastic/terraform-provider-elasticstack/pull/729))
6
7
- Add support for `remote_indicies` to `elasticstack_elasticsearch_security_role` & `elasticstack_kibana_security_role` (#723)[https://github.com/elastic/terraform-provider-elasticstack/pull/723]
7
8
- Fix error handling in `elasticstack_kibana_import_saved_objects` ([#738](https://github.com/elastic/terraform-provider-elasticstack/pull/738))
8
-
- Remove `space_id` parameter from private locations to fix inconsistent state for `elasticstack_kibana_synthetics_private_location``space_id` ([#733](https://github.com/elastic/terraform-provider-elasticstack/pull/733))
9
+
- Remove `space_id` parameter from private locations to fix inconsistent state for `elasticstack_kibana_synthetics_private_location``space_id` ([#733](https://github.com/elastic/terraform-provider-elasticstack/pull/733))
9
10
- Add the `Frequency` field to the Create Rule API ([#753](https://github.com/elastic/terraform-provider-elasticstack/pull/753))
10
11
- Prevent a provider panic when the repository referenced in an `elasticstack_elasticsearch_snapshot_repository` does not exist ([#758](https://github.com/elastic/terraform-provider-elasticstack/pull/758))
11
12
- Add support for `remote_indicies` to `elasticstack_elasticsearch_security_api_key` (#766)[https://github.com/elastic/terraform-provider-elasticstack/pull/766]
Copy file name to clipboardExpand all lines: docs/resources/kibana_alerting_rule.md
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -86,9 +86,30 @@ Required:
86
86
87
87
Optional:
88
88
89
+
-`alerts_filter` (Block List, Max: 1) Conditions that affect whether the action runs. If you specify multiple conditions, all conditions must be met for the action to run. For example, if an alert occurs within the specified time frame and matches the query, the action runs. (see [below for nested schema](#nestedblock--actions--alerts_filter))
89
90
-`frequency` (Block List, Max: 1) The properties that affect how often actions are generated. If the rule type supports setting summary to true, the action can be a summary of alerts at the specified notification interval. Otherwise, an action runs for each alert at the specified notification interval. NOTE: You cannot specify these parameters when `notify_when` or `throttle` are defined at the rule level. (see [below for nested schema](#nestedblock--actions--frequency))
90
91
-`group` (String) The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names.
91
92
93
+
<aid="nestedblock--actions--alerts_filter"></a>
94
+
### Nested Schema for `actions.alerts_filter`
95
+
96
+
Optional:
97
+
98
+
-`kql` (String) Defines a query filter that determines whether the action runs. Written in Kibana Query Language (KQL).
99
+
-`timeframe` (Block List, Max: 1) Defines a period that limits whether the action runs. (see [below for nested schema](#nestedblock--actions--alerts_filter--timeframe))
### Nested Schema for `actions.alerts_filter.timeframe`
103
+
104
+
Required:
105
+
106
+
-`days` (List of Number) Defines the days of the week that the action can run, represented as an array of numbers. For example, 1 represents Monday. An empty array is equivalent to specifying all the days of the week.
107
+
-`hours_end` (String) Defines the range of time in a day that the action can run. The end of the time frame in 24-hour notation (hh:mm).
108
+
-`hours_start` (String) Defines the range of time in a day that the action can run. The start of the time frame in 24-hour notation (hh:mm).
109
+
-`timezone` (String) The ISO time zone for the hours values. Values such as UTC and UTC+1 also work but lack built-in daylight savings time support and are not recommended.
Description: "Conditions that affect whether the action runs. If you specify multiple conditions, all conditions must be met for the action to run. For example, if an alert occurs within the specified time frame and matches the query, the action runs.",
130
+
Type: schema.TypeList,
131
+
MinItems: 0,
132
+
MaxItems: 1,
133
+
Optional: true,
134
+
Elem: &schema.Resource{
135
+
Schema: map[string]*schema.Schema{
136
+
"kql": {
137
+
Description: "Defines a query filter that determines whether the action runs. Written in Kibana Query Language (KQL).",
138
+
Type: schema.TypeString,
139
+
Optional: true,
140
+
},
141
+
"timeframe": {
142
+
Description: "Defines a period that limits whether the action runs.",
143
+
Type: schema.TypeList,
144
+
MinItems: 0,
145
+
MaxItems: 1,
146
+
Optional: true,
147
+
Elem: &schema.Resource{
148
+
Schema: map[string]*schema.Schema{
149
+
"days": {
150
+
Description: "Defines the days of the week that the action can run, represented as an array of numbers. For example, 1 represents Monday. An empty array is equivalent to specifying all the days of the week.",
151
+
Type: schema.TypeList,
152
+
Required: true,
153
+
Elem: &schema.Schema{
154
+
Type: schema.TypeInt,
155
+
ValidateFunc: validation.IntBetween(1, 7),
156
+
},
157
+
},
158
+
"timezone": {
159
+
Description: "The ISO time zone for the hours values. Values such as UTC and UTC+1 also work but lack built-in daylight savings time support and are not recommended.",
160
+
Type: schema.TypeString,
161
+
Required: true,
162
+
},
163
+
"hours_start": {
164
+
Description: "Defines the range of time in a day that the action can run. The start of the time frame in 24-hour notation (hh:mm).",
165
+
Type: schema.TypeString,
166
+
Required: true,
167
+
ValidateFunc: utils.StringIsHours,
168
+
},
169
+
"hours_end": {
170
+
Description: "Defines the range of time in a day that the action can run. The end of the time frame in 24-hour notation (hh:mm).",
0 commit comments