Ensure boto3_route53 correctly validates existing ALIAS records

This commit is contained in:
Martin Paulus 2019-02-05 12:44:40 +01:00
parent ff633b0b9b
commit 7640e90347

View file

@ -693,6 +693,9 @@ def rr_present(name, HostedZoneId=None, DomainName=None, PrivateZone=False, Name
if rrset.get('ResourceRecords') != None:
if ResourceRecords != sorted(rrset.get('ResourceRecords'), key=lambda x: x['Value']):
update = True
elif (AliasTarget != None) and (rrset.get('AliasTarget') != None):
if sorted(AliasTarget) != sorted(rrset.get('AliasTarget')):
update = True
if not create and not update:
ret['comment'] = ('Route 53 resource record {} with type {} is already in the desired state.'