Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
Resource mismatch between app settings and execution log (#119)
Browse files Browse the repository at this point in the history
* Fixed consistency between service name in logs and settings

* Bumped app settings version

* Changelog and version bump
  • Loading branch information
mlevit authored Jul 5, 2022
1 parent c120c1d commit 64831c3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AWS Auto Cleanup Changelog

## UNRELEASED
## 2.2.0

- Added wildcard support to allowlist resource ID. Comparisons are now performed using the [fnmatch](https://docs.python.org/3/library/fnmatch.html) Python module. The following special characters can be used:

Expand All @@ -12,6 +12,7 @@
| [!seq] | matches any character not in seq |

- Added Kafka Serverless Cluster cleanup.
- Fixed mismatch between app settings and exeuction log for Elastic Beanstalk and Elasticsearch Service. This prevented allowlisting via the execution log in the web app.

## 2.1.0

Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "auto-cleanup-app",
"description": "Auto Cleanup App",
"version": "2.1.0",
"version": "2.2.0",
"private": true,
"devDependencies": {
"serverless-python-requirements": "^5.1.0"
Expand Down
6 changes: 3 additions & 3 deletions app/src/data/auto-cleanup-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"S": "version"
},
"value": {
"N": "9"
"N": "10"
}
},
{
Expand Down Expand Up @@ -316,7 +316,7 @@
}
}
},
"elasticbeanstalk": {
"elastic_beanstalk": {
"M": {
"application": {
"M": {
Expand Down Expand Up @@ -363,7 +363,7 @@
}
}
},
"elasticsearch": {
"elasticsearch_service": {
"M": {
"domain": {
"M": {
Expand Down
6 changes: 3 additions & 3 deletions app/src/elasticbeanstalk_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ def applications(self):
self.logging.debug("Started cleanup of Elastic Beanstalk Applications.")

is_cleaning_enabled = Helper.get_setting(
self.settings, "services.elasticbeanstalk.application.clean", False
self.settings, "services.elastic_beanstalk.application.clean", False
)
resource_maximum_age = Helper.get_setting(
self.settings, "services.elasticbeanstalk.application.ttl", 7
self.settings, "services.elastic_beanstalk.application.ttl", 7
)
resource_allowlist = Helper.get_allowlist(
self.allowlist, "elasticbeanstalk.application"
self.allowlist, "elastic_beanstalk.application"
)

if is_cleaning_enabled:
Expand Down
6 changes: 3 additions & 3 deletions app/src/elasticsearch_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def domains(self):
self.logging.debug("Started cleanup of Elasticsearch Service Domains.")

is_cleaning_enabled = Helper.get_setting(
self.settings, "services.elasticsearch.domain.clean", False
self.settings, "services.elasticsearch_service.domain.clean", False
)
resource_maximum_age = Helper.get_setting(
self.settings, "services.elasticsearch.domain.ttl", 7
self.settings, "services.elasticsearch_service.domain.ttl", 7
)
resource_allowlist = Helper.get_allowlist(
self.allowlist, "elasticsearch.domain"
self.allowlist, "elasticsearch_service.domain"
)

if is_cleaning_enabled:
Expand Down

0 comments on commit 64831c3

Please sign in to comment.