Description
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:
- 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
- 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.