Skip to content

Change index selectors, update to current standards #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Oct 8, 2020
Merged

Change index selectors, update to current standards #25

merged 15 commits into from
Oct 8, 2020

Conversation

Nuru
Copy link
Contributor

@Nuru Nuru commented Oct 7, 2020

what

  • Update providers to support AWS 3.x and generally convert ~> to >=
  • BREAKING CHANGE: Rebase es-cleanup.py on cloudreach v0.14
  • Update test dependencies, use Go modules, ensure test resources include random component
  • Update to context.tf
  • Update GitHub actions

why

  • AWS 3.x has new features we need. ~> inhibits testing new releases.
  • Now index selection is regex minus regex, much better than previous comma separated list. Other bug fixes.
  • Test with current modules using current testing practices
  • Keep in sync with other modules

migration

Prior versions had index which was a comma-separated list of index names or the special name "all" to indicate all but Kibana indexes, and index_regex which was a regular expression for parsing index name and date parts. There was no mechanism for specifying a list of indexes to exclude. This version drops those input variables and instead provides index_re and skip_index_re, both of which are regular expressions. You probably want to anchor your regexes to the beginning of the index name by starting with ^.

  • If the full index name, including the date part, matches skip_index_re, then the index will be skipped (never deleted).
  • If the index name without the trailing -date part matches index_re, then it will be cleaned up according to the date part.
If you previously had Now use
index = "all" Default values for index_re and skip_index_re
index = "a,xb,c0" index_re = "^(a|xb|c0)" and skip_index_re = "^$"
index_regex = "(ipat)-(dpat)" index_re = "ipat" and be sure index_format is correct for your date format

Keep in mind that fundamentally, this module expects indexes to be in the format of name-date so it will not work properly if the regexes end up selecting an index that does not end with -date. To avoid edge cases, it is wise not to include dashes in your index name or date format.

@Nuru Nuru requested review from aknysh and osterman October 7, 2020 04:52
@Nuru Nuru requested a review from a team as a code owner October 7, 2020 05:10
@Nuru
Copy link
Contributor Author

Nuru commented Oct 7, 2020

/test all

@osterman
Copy link
Member

osterman commented Oct 7, 2020

image

@Nuru
Copy link
Contributor Author

Nuru commented Oct 7, 2020

/test all

@Nuru
Copy link
Contributor Author

Nuru commented Oct 7, 2020

/test all

1 similar comment
@Nuru
Copy link
Contributor Author

Nuru commented Oct 8, 2020

/test all

osterman
osterman previously approved these changes Oct 8, 2020
@Nuru
Copy link
Contributor Author

Nuru commented Oct 8, 2020

/test all

@Nuru
Copy link
Contributor Author

Nuru commented Oct 8, 2020

/test all

@Nuru
Copy link
Contributor Author

Nuru commented Oct 8, 2020

/test all

@Nuru
Copy link
Contributor Author

Nuru commented Oct 8, 2020

/test terratest

@Nuru
Copy link
Contributor Author

Nuru commented Oct 8, 2020

/test all

@Nuru
Copy link
Contributor Author

Nuru commented Oct 8, 2020

/test all

@Nuru
Copy link
Contributor Author

Nuru commented Oct 8, 2020

/test all

@Nuru
Copy link
Contributor Author

Nuru commented Oct 8, 2020

/test bats

@Nuru
Copy link
Contributor Author

Nuru commented Oct 8, 2020

/test readme terratest

@Nuru
Copy link
Contributor Author

Nuru commented Oct 8, 2020

/test terratest

@Nuru
Copy link
Contributor Author

Nuru commented Oct 8, 2020

/test all

@Nuru Nuru merged commit e1075a6 into master Oct 8, 2020
@Nuru Nuru deleted the aws3 branch October 8, 2020 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants