Created
February 22, 2021 11:19
-
-
Save rrobby86/1d652eb6ee9c8d8e27c948084e7d05f2 to your computer and use it in GitHub Desktop.
Route53 zone transfer jq helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # jq script to convert output of list-resource-record-sets into valid input for change-resource-record-sets | |
| # NS and SOA records are removed | |
| # based on https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-migrating.html | |
| # (aliases and domain name change are not handled) | |
| .ResourceRecordSets|map(select(.Type!="NS" and .Type!="SOA")|{"Action":"CREATE","ResourceRecordSet":.})|{"Changes":.} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
strong work