Created
May 3, 2019 11:55
-
-
Save tcarrondo/c2bb7ca6861cd5d02ca766f837d033ac to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
zonename=$1 | |
profile=$2 | |
hostedzoneid=$(aws route53 --profile=$profile list-hosted-zones | jq -r ".HostedZones[] | select(.Name == \"$zonename.\") | .Id" | cut -d'/' -f3) | |
aws route53 --profile=$profile list-resource-record-sets --hosted-zone-id $hostedzoneid --output json | jq -jr '.ResourceRecordSets[] | "\(.Name) \t\(.TTL) \t\(.Type) \t\(.ResourceRecords[].Value)\n"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment