-
Couldn't load subscription status.
- Fork 122
Description
Describe the bug
Attempting to create a elasticstack_elasticsearch_security_api_key succeeds in provisioning the key but results in the following error message
elasticstack_elasticsearch_security_api_key.jenkins_otel_api_key, provider
"provider["registry.terraform.io/elastic/elasticstack"]" produced an
unexpected new value: .role_descriptors: was
cty.StringVal("{"jenkins-otel":{"cluster":["monitor","read_ilm"],"indices":[{"names":["logs-apm.app*"],"privileges":["read","view_index_metadata"]}]}}"),
but now
cty.StringVal("{"jenkins-otel":{"cluster":["monitor","read_ilm"],"indices":[{"names":["logs-apm.app*"],"privileges":["read","view_index_metadata"],"allow_restricted_indices":false}]}}").
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
So that is why I created this issue.
To Reproduce
Steps to reproduce the behavior:
- TF configuration used '...'
resource "elasticstack_elasticsearch_security_api_key" "jenkins_otel_api_key" {
name = "Jenkins OTel API Key"
role_descriptors = jsonencode({
jenkins-otel = {
cluster = ["monitor", "read_ilm"],
indices = [
{
names = ["logs-apm.app*"], # Needed to show logs in Jenkins UI
privileges = ["read", "view_index_metadata"]
}
]
}
}
-
TF operations to execute to get the error '...' [e.g
terraform plan,terraform apply,terraform destroy]
terraform planproduced a valid plan
terraform applycreated the resource but returns an error. -
See the error in the output '...'
Expected behavior
Easy apply without error. Or improved documentation and validation for any required config.
Debug output
Not included.
Screenshots
N/A
Versions (please complete the following information):
- Terraform Version
1.8.1 - Provider version
0.11.16(latest as of right now) - Elasticsearch Version
8.17.1
Additional context
N/A