From 62122e442931cf30f7b98cd91280419a3c58fac7 Mon Sep 17 00:00:00 2001 From: Tom Kaminski Date: Thu, 20 May 2021 15:24:34 -0500 Subject: [PATCH] More explicit check for CNAME records when checking for extra updates --- octodns/provider/route53.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/octodns/provider/route53.py b/octodns/provider/route53.py index a3b3a57..ad59eb0 100644 --- a/octodns/provider/route53.py +++ b/octodns/provider/route53.py @@ -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