1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

More explicit check for CNAME records when checking for extra updates

This commit is contained in:
Tom Kaminski
2021-05-20 15:24:34 -05:00
parent f5d81be2fb
commit 62122e4429

View File

@@ -1253,15 +1253,11 @@ class Route53Provider(BaseProvider):
return self._gen_mods('DELETE', existing_records, existing_rrsets)
def _extra_changes_update_needed(self, record, rrset):
value = rrset['ResourceRecords'][0]['Value']
try:
ip_address(text_type(value))
# We're working with an IP
if record._type == 'CNAME':
# For CNAME, healthcheck host by default points to the CNAME value
healthcheck_host = rrset['ResourceRecords'][0]['Value']
else:
healthcheck_host = record.healthcheck_host
except (AddressValueError, ValueError):
# This isn't an IP, host is the value
healthcheck_host = value
healthcheck_path = record.healthcheck_path
healthcheck_protocol = record.healthcheck_protocol