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
* Removes rule type specific validations in models_* files in favor of schema validations
* Adds validation to enforce index or data_view_id is set (except in cases where they are not supported machine_learning, esql)
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
## [Unreleased]
2
2
3
3
- Fix regression restricting the characters in an `elasticstack_elasticsearch_role_mapping``name`. ([#1373](https://github.com/elastic/terraform-provider-elasticstack/pull/1373))
4
+
- Add schema validations to require either (but not both) `index` and `data_view_id` is set for relevant Security Detection Rules
MarkdownDescription: "Query and filter context array to define alert conditions as JSON. Supports complex filter structures including bool queries, term filters, range filters, etc. Available for all rule types.",
303
320
Optional: true,
304
321
CustomType: jsontypes.NormalizedType{},
322
+
Validators: []validator.String{
323
+
validators.ForbiddenIfDependentPathOneOf(
324
+
path.Root("type"),
325
+
[]string{"machine_learning", "esql"},
326
+
),
327
+
},
305
328
},
306
329
"note": schema.StringAttribute{
307
330
MarkdownDescription: "Notes to help investigate alerts produced by the rule.",
MarkdownDescription: "Anomaly score threshold above which the rule creates an alert. Valid values are from 0 to 100. Required for machine_learning rules.",
0 commit comments