Skip to content

Commit

Permalink
case insenstive RR compare
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed May 17, 2023
1 parent 1def8b9 commit ad20d34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/ddns-lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
LOGGER = logging.getLogger()
account_id = None
region = None
VERSION = '2.0.5'
VERSION = '2.0.6'

# Read Env variables
DEBUG_LOG_LEVEL = os.environ.get('DebugLogLevel', 'INFO')
Expand Down Expand Up @@ -1980,8 +1980,8 @@ def new_get_resource_record(oclient, instance_id, zone_id, host_name, hosted_zon
rr_name = rr_set['Name']
# check if the return value matches the record, if not ignore
# if the record isn't there, it returns the list_resource_record_sets returns the next record
# if rr_name == (host_name + hosted_zone_name):
if rr_name == fqdn:
# make checks case insensitive
if rr_name.lower() == fqdn.lower():
value = rr_set['ResourceRecords'][0]['Value']
LOGGER.debug(
f"list_resource_record_sets returned value {value}: {lineno()}")
Expand Down

0 comments on commit ad20d34

Please sign in to comment.