Releases: cloudposse/terraform-aws-lambda-elasticsearch-cleanup
v0.12.0
context.tf updated to v0.24.1, minimum required Terraform version bumped to 0.13.0 when needed, readme updated @maximmi (#30)
what
- update context.tf to v0.24.1
- minimum required Terraform version bumped to 0.13.0
- readme updated, Bridgecrew compliance badges added
why
- It allows for setting the letter case of tag names and labels, back compatibility with context v0.22.0 and below
- we have dropped support for Terraform 0.12
- To be able see and fix the recommendations from Bridgecrew so we can position our modules as standards compliant
v0.11.0
v0.10.2
v0.10.1
🐛 Bug Fixes
Workaround TF null default bug @Nuru (#26)
what
- Default
git_ref
to""
instead ofnull
- Lambda artifact generation for PRs now uses PR SHA
why
- Passing
null
is supposed to make the module use the default value, but in this case it does not - Terraform code expects to find artifact with same SHA as Terraform module
references
v0.10.0
Change index selectors, update to current standards @Nuru (#25)
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 matchesindex_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.
0.9.0: Update Version Pinning for Terraform to support 0.13
What
- Update Version Pinning for Terraform to support 0.13
Why
- This is a relatively minor update that the CloudPosse module already likely supports.
- This allows module consumers to not individually update our Terraform module to support Terraform 0.13.
0.8.0 Matching index with regex pattern #20
what
- Added matching index and splitting it with regex pattern.
why
- Fluentd send logs to ES and creates indexes with pattern
logstash-%Y.%m.%d
where it's possible for other applications to create different index patterns - for example Kinesis Firehose will createlogstash-%Y-%m-%d
. Such pattern triggers deletion of all indexes by this lambda.
0.7.0: build lambda (#19)
* build lambda * upload with public readability; * test download * fix action
0.6.0 Update `terraform-external-module-artifact` version
what
- Update
terraform-external-module-artifact
version
why
- Add
enabled
variable to the module - When the
terraform-external-module-artifact
module is used in this module withenabled
variable set tofalse
,terraform-external-module-artifact
needs to be disabled as well (otherwise it throws errors that it can't download the artifact)
references
0.5.0 Convert to TF 0.12. Add tests. Add Codefresh test pipeline. Add `slash-command-dispatch` GitHub Actions workflow
what
- Port module to Terraform 0.12
- Pin all providers
- Add example for testing
- Add
bats
andterratest
for the example - Add Codefresh badge to point to the test pipeline in
terraform-modules
project - Update README
- Add
slash-command-dispatch
GitHub Actions workflow
why
- Module currently does not work with 0.12. Much easier syntax
- Better regression control
- Automatically test the example on every commit and pull request
- Provision resources on AWS in the test account and check the outputs for the correct values
terraform-modules
project contains pipelines for all terraform modulesslash-command-dispatch
GitHub Actions workflow: In a repo with the GitHub actions workflow present, when a PR is opened, we can comment on the PR with commands/build-readme
and/terraform-fmt
to rebuild README and format terraform code and push the changes back to the PR repo