I want to export some public domain names present in aws
route53
and use those in my private network in CloudDns
in google.
I see one option is to list the records in aws as yaml :
aws route53 list-resource-record-sets --hosted-zone-id <zoneID> --output yaml
Then export this in google cloud dns as private zone
gcloud dns record-sets import -z=EXAMPLE_ZONE_NAME --zone-file-format path-to-example-zone-file --visibility=private
Just wondering if this will work and if there is any complexity with this if anyone else has tried.
PS: Not removing/updating aws route53 yet for this, its just a sample to learn.
EDIT: Export using listing of records by aws command as yaml format did not work, so I installed cli53 ( a tool to manage route 53 records)
Then exported it using below cli53 command
cli53 export
Later, I tried to import in google cloud using below commands :
gcloud dns managed-zones create private-zone --description="private zone" --visibility=private --dns-name="example.com" --networks=default
I tried to import the dns records into cloud dns private zone
gcloud dns record-sets import -z="private-zone" --zone-file-format dns_export_cli53_bind_wedev_tools
But this does not import anything and below message is coming on the terminal. There are 4 records other than NS, SOA and alias in the file
"Nothing to do, all the records in "
I removed the ns records and @origin at the top. of file , that worked