Allow to delete indices related to index templates#1692
Merged
danielmitterdorfer merged 2 commits intoelastic:masterfrom Mar 29, 2023
Merged
Allow to delete indices related to index templates#1692danielmitterdorfer merged 2 commits intoelastic:masterfrom
danielmitterdorfer merged 2 commits intoelastic:masterfrom
Conversation
With this commit we make sure that index patterns are allowed when deleting indices that are related to index templates (both legacy and composable templates). Prior to this commit, an attempt to delete a related index would fail with: ``` Wildcard expressions or all indices are not allowed ``` This is because Elasticsearch requires `action.destructive_requires_name` to be set to `false` in order to process delete requests with wildcards. Relates elastic#1152
dliappis
approved these changes
Mar 27, 2023
| # ensure that we do not provide an empty index pattern by accident | ||
| if delete_matching_indices and index_pattern: | ||
| # only set if really required | ||
| if current_destructive_setting is None: |
Contributor
There was a problem hiding this comment.
For anyone else wondering what's up here, it's related to the delete-matching-indices property of templates and composable-templates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With this commit we make sure that index patterns are allowed when deleting indices that are related to index templates (both legacy and composable templates). Prior to this commit, an attempt to delete a related index would fail with:
This is because Elasticsearch requires
action.destructive_requires_nameto be set tofalsein order to process delete requests with wildcards.Relates #1152