Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ inputs = {

### Changes

- Fix handling of empty `except` attributes in `elasticstack_elasticsearch_security_role` ([#1581](https://github.com/elastic/terraform-provider-elasticstack/pull/1581))
- Fix the enabled property being ignored in `elasticstack_kibana_alerting_rule` ([#1527](https://github.com/elastic/terraform-provider-elasticstack/pull/1527))
- Add `advanced_monitoring_options` to `elasticstack_fleet_agent_policy` to configure HTTP monitoring endpoint and diagnostics settings ([#1537](https://github.com/elastic/terraform-provider-elasticstack/pull/1537))
- Move the `input` block to an `inputs` map in `elasticstack_fleet_integration_policy` ([#1482](https://github.com/elastic/terraform-provider-elasticstack/pull/1482))
Expand Down
4 changes: 2 additions & 2 deletions internal/elasticsearch/security/role/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,13 @@ func (data *RoleData) fromAPIModel(ctx context.Context, role *models.Role) diag.

var fieldSecObj types.Object
if index.FieldSecurity != nil {
grantSet, d := types.SetValueFrom(ctx, types.StringType, index.FieldSecurity.Grant)
grantSet, d := types.SetValueFrom(ctx, types.StringType, utils.NonNilSlice(index.FieldSecurity.Grant))
diags.Append(d...)
if diags.HasError() {
return diags
}

exceptSet, d := types.SetValueFrom(ctx, types.StringType, index.FieldSecurity.Except)
exceptSet, d := types.SetValueFrom(ctx, types.StringType, utils.NonNilSlice(index.FieldSecurity.Except))
diags.Append(d...)
if diags.HasError() {
return diags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ resource "elasticstack_elasticsearch_security_role" "test" {
names = ["index1", "index2"]
privileges = ["all"]
field_security {
grant = ["*"]
grant = ["*"]
except = []
}
}

Expand Down