Skip to content

Commit 28212a7

Browse files
authored
Allow index or data_view_id to be unknown (#1499)
* Allow index or data_view_id to be unknown * CHANGELOG.md
1 parent 0308442 commit 28212a7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ alias = [
4040

4141
### Changes
4242

43+
- Allow `index` and `data_view_id` values to both be unknown during planning in `elasticstack_kibana_security_detection_rule` ([#1499](https://github.com/elastic/terraform-provider-elasticstack/pull/1499))
4344
- Support `.bedrock` and `.gen-ai` connectors ([#1467](https://github.com/elastic/terraform-provider-elasticstack/pull/1467))
4445
- Support the `solution` attribute in `elasticstack_kibana_space` from 8.16 ([#1486](https://github.com/elastic/terraform-provider-elasticstack/pull/1486))
4546
- Add `elasticstack_elasticsearch_alias` resource ([#1343](https://github.com/elastic/terraform-provider-elasticstack/pull/1343))

internal/kibana/security_detection_rule/schema.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,11 +970,10 @@ func (r securityDetectionRuleResource) ValidateConfig(ctx context.Context, req r
970970

971971
}
972972

973-
if !utils.IsKnown(data.Index) && !utils.IsKnown(data.DataViewId) {
973+
if data.Index.IsNull() && data.DataViewId.IsNull() {
974974
resp.Diagnostics.AddError(
975975
"Invalid Configuration",
976976
"One of 'index' or 'data_view_id' must be set.",
977977
)
978-
979978
}
980979
}

0 commit comments

Comments
 (0)