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
Support restriction in elasticstack_elasticsearch_security_api_key (#577)
* Support restriction in elasticstack_elasticsearch_security_api_key
* Update example in docs
* Skip test for API key with restriction on any version below 8.9
* Update docs
* Raise error when restriction is not supported for API keys
* Appease the linter
* Small refactor
* Revert debug change
* Booleans are hard
* This is a finicky test
* Format a terraform example file
* Use the ServerVersion() instead of creating a whole new request
* Update docs
* Remove two unused structs
* Changelog
---------
Co-authored-by: Toby Brain <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
- Fix setting `id` for Fleet outputs and servers ([#666](https://github.com/elastic/terraform-provider-elasticstack/pull/666))
4
4
- Fix `elasticstack_fleet_enrollment_tokens` returning empty tokens in some case ([#683](https://github.com/elastic/terraform-provider-elasticstack/pull/683))
5
5
- Add support for Kibana synthetics private locations ([#696](https://github.com/elastic/terraform-provider-elasticstack/pull/696))
6
+
- Support setting `restriction` in `elasticstack_elasticsearch_security_api_key` role definitions ([#577](https://github.com/elastic/terraform-provider-elasticstack/pull/577))
returndiag.Errorf("Specifying `restriction` on an API key role description is not supported in this version of Elasticsearch. Role descriptor(s) %s", strings.Join(keysWithRestrictions, ", "))
136
+
}
137
+
}
115
138
}
116
139
117
140
ifv, ok:=d.GetOk("metadata"); ok {
@@ -155,6 +178,16 @@ func resourceSecurityApiKeyCreate(ctx context.Context, d *schema.ResourceData, m
ExpectError: regexp.MustCompile(fmt.Sprintf(".*Error: Specifying `restriction` on an API key role description is not supported in this version of Elasticsearch. Role descriptor\\(s\\) %s.*", "role-a")),
0 commit comments