Skip to content

A trailing dot is added to the value when exporting/importing domains #314

@vandr0iy

Description

@vandr0iy

Issue type

  • Bug report

cli53 version (cli53 --version)

built it from source using go get github.com/barnybug/cli53/cmd/cli53 as of Mon 19 Apr 2021 01:57:46 PM CEST. If I run this command it returns

cli53 version master

OS / Platform

OS: NixOS 20.09 (Nightingale) x86_64
Host: 20EN0006MZ ThinkPad P50
Kernel: 5.4.100
Shell: zsh 5.8
Terminal: alacritty
CPU: Intel i7-6820HQ (8) @ 3.600GHz
GPU: NVIDIA Quadro M2000M
Memory: 15842MiB / 23953MiB

Steps to reproduce

  • export a domain from route53:
cli53 export --full domainname.tld > route53-hostedzone.txt
  • create an new one (in my case it was a new account):
export CR="$(date +'%Y-%m-%d-%H-%M-%S')"
aws route53 create-hosted-zone --name 'domainname.tld' --caller-reference "${CR}"
  • import the file from before:
cli53 import --file route53-hostedzone.txt 'domainname.tld'

Expected behaviour

A hosted zone with exactly same identical records to the old one

Actual behaviour

most of the records have a trailing dot. The way one notices is by doing this:

aws route53 list-resource-record-sets --hosted-zone-id $oldhostedzoneid --output json > old.domainname.json
# ---switch accounts
aws route53 list-resource-record-sets --hosted-zone-id $newhostedzoneid --output json > new.domainname.json
diff new.domainname.json old.domainname.json

the output shows a lot of these:

...
872c872
<                     "Value": "cname.vercel-dns.com."
---
>                     "Value": "cname.vercel-dns.com"
...

Note the trailing dot in the record on the 2nd line, from new.domainname.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions