Add a missing trailing dot to the Name of ResourceRecordSet
AWS Route53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical. Hence, after creating a `www.example.com` record, `www.example.com.` name is saved in Route53. But moto treated `www.example.com` and `www.example.com.` as different. This commit fixes the moto behavior.
This commit is contained in:
parent
ed861ecae1
commit
293b25a8f9
2 changed files with 15 additions and 12 deletions
|
|
@ -123,6 +123,9 @@ class Route53(BaseResponse):
|
|||
""" % (record_set['Name'], the_zone.name)
|
||||
return 400, headers, error_msg
|
||||
|
||||
if not record_set['Name'].endswith('.'):
|
||||
record_set['Name'] += '.'
|
||||
|
||||
if action in ('CREATE', 'UPSERT'):
|
||||
if 'ResourceRecords' in record_set:
|
||||
resource_records = list(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue