Skip to content

Commit

Permalink
1. created a new def process_delete_record function to combine "repea…
Browse files Browse the repository at this point in the history
…ting" tasks between A, PTR, and CNAME process. The code was combined with what was there before. Instead of doing the same process over 3 times, I just created a function and call it 3 times.

1. The def process_delete_record function performs:
  1. checks TXT heritage validation (do I own it? does the instance ID match?)
  1. Also sends SNS notification if heritage validation fails.
  1. If not not pass validation, it skips deletion and sns notify
  1. If so, it deletes the records - (A, PTR, or CNAME and associated TXT)
1. Fixed LOGGER.info lines that had a typo (missing parameter) in the sns notification caller.  Example line 2274 but several others.
1. Fixed lOGGER.info to convert MAX_API_RETRY to string when writing to log. Example line 2264 but several others.
1. Updated new_get_resource_record with several fixes.
  1. Return "" instead of Non if not found -- better align with parent function that calls it.
  1. Checks the value of the list_resource_record_sets to match what should be returned. This is because the list_resource_record_sets API returns the next record (instead of matching exact) so wrong record can be retrieved if we do not check it.
  1. MaxItem value changed to string.
1. Fixed def parse_heritage to add more logging and better input validation
1. Fixed def get_heritage_item to check input type and add more logging
  • Loading branch information
badra001 committed Apr 18, 2022
1 parent 8d53d4b commit 4dc8b71
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,20 @@
* 0.2.7 -- 2022-04-12
- code 0.2.3
- added heritage functions

* 0.3.0 -- 2022-04-18
- code 0.3.0
1. created a new def process_delete_record function to combine "repeating" tasks between A, PTR, and CNAME process. The code was combined with what was there before. Instead of doing the same process over 3 times, I just created a function and call it 3 times.
1. The def process_delete_record function performs:
1. checks TXT heritage validation (do I own it? does the instance ID match?)
1. Also sends SNS notification if heritage validation fails.
1. If not not pass validation, it skips deletion and sns notify
1. If so, it deletes the records - (A, PTR, or CNAME and associated TXT)
1. Fixed LOGGER.info lines that had a typo (missing parameter) in the sns notification caller. Example line 2274 but several others.
1. Fixed lOGGER.info to convert MAX_API_RETRY to string when writing to log. Example line 2264 but several others.
1. Updated new_get_resource_record with several fixes.
1. Return "" instead of Non if not found -- better align with parent function that calls it.
1. Checks the value of the list_resource_record_sets to match what should be returned. This is because the list_resource_record_sets API returns the next record (instead of matching exact) so wrong record can be retrieved if we do not check it.
1. MaxItem value changed to string.
1. Fixed def parse_heritage to add more logging and better input validation
1. Fixed def get_heritage_item to check input type and add more logging
Binary file modified code/ddns-lambda.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion version.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
locals {
_module_version = "0.2.7"
_module_version = "0.3.0"
}

0 comments on commit 4dc8b71

Please sign in to comment.