Skip to content

Template can be created with wildcard * in the name #43737

@nerophon

Description

@nerophon

Elasticsearch version (bin/elasticsearch --version): Affect all versions currently

Description of the problem including expected versus actual behavior:
It is possible to create a new template with a wildcard in the name. My expectation is that this should be prevented, because it leads to difficulty deleting the template individually.

Steps to reproduce:

  1. Run: DELETE _template/test-*
  2. Run GET _template/test-*
  3. Observe there is no template named "test-*"
  4. Run:
PUT _template/test-*
{ 
  "order" : 10, 
  "index_patterns" : ["test-*"]
}
  1. Run:
PUT _template/test-inner-*
{ 
  "order" : 10, 
  "index_patterns" : ["test-inner-*"]
}
  1. Run GET _template/test-*
  2. Observe that there is a template named "test-" and "test-inner-"
  3. Run DELETE _template/test-*
  4. Run GET _template/test-*
  5. Observe that both "test-" and "test-inner-" are no longer present

This behaviour is verified on 6.6.2 and 6.7.0 and 7.6.1

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions