Skip to content

[Bug] Unable to use the option allow_restricted_indices when creating security role #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
greibrokka opened this issue Jul 20, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@greibrokka
Copy link

Describe the bug
Attempting to create a security role with write-access to system-indexes. Related to elastic/elasticsearch#81400

To Reproduce
Steps to reproduce the behavior:

  1. TF configuration used
    'resource "elasticstack_elasticsearch_security_role" "fleet_superuser" {
    name = "fleet_superuser"

indices {
names = [".fleet*"]
privileges = ["all"]
allow_restricted_indices = true

}

metadata = jsonencode({
description = "Fleet_superuser per Elastic recommendation - ITSI-17455"
})
}

output "role" {
value = elasticstack_elasticsearch_security_role.fleet_superuser
}'
2. TF operations to execute to get the error '...' [e.g terraform plan,terraform apply, terraform destroy]
When executing terraform plan it throws an error

  1. See the error in the output
    'An argument named "allow_restricted_indices" is not expected here'

Expected behavior
Creating a security role with this option using API works, so option should be available also using terraform

Versions (please complete the following information):

  • OS: [e.g. Linux] Elastic Service in Azure
  • Terraform Version 3.14.0
  • Provider version 0.3.3
  • Elasticsearch Version 8.3.2

Additional context
I've opened a ticket with Elastic support which recommended to create a bug report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants