-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Description
When trying to create an index with a date in the name via the Terraform Provider for Elastic, the operation fails due to unsupported special characters in the index name. The same command works in Kibana DevTools but not through the Terraform provider.
To Reproduce
Steps to reproduce the behavior:
- Terraform (TF) configuration used:
resource "elasticstack_elasticsearch_index" "nginx-k8s-prod-logs-vcae" { name = " %3Cnginx-k8s-prod-logs-vcae-%7Bnow%2Fs%7Byyyy-MM-dd%7D%7D-00001%3E" aliases = { "nginx-k8s-prod-logs-vcae" = { is_write_index = true } } }
- Execute the following TF operations to replicate the error:
terraform plan
terraform apply
- Observe the following error in the output:
╷ │ Error: invalid value for name (must contain lowercase alphanumeric characters and selected punctuation, see: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-path-params) │ │ with elasticstack_elasticsearch_index.nginx-k8s-prod-logs-vcae, │ on rollover-index_vcae.tf line 2, in resource "elasticstack_elasticsearch_index" "nginx-k8s-prod-logs-vcae": │ 2: name = "nginx-k8s-prod-logs-vcae-{now/s{yyyy-MM-dd}}-00001" │
Expected behavior
The index should be created successfully with the specified date in the name, similar to how the command works when executed directly in Kibana DevTools.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working