# depends on: DOMAIN_NAME# output: see output to setup NS record on upstream domain registry# quick link: https://panlm.github.io/CLI/functions/func-create-hosted-zone.shfunctioncreate-hosted-zone(){OPTIND=1OPTSTRING="h?n:"localDOMAIN_NAME=""whilegetopts${OPTSTRING}opt;docase"${opt}"inn)DOMAIN_NAME=${OPTARG};;h|\?)echo"format: create-host-zone -n DOMAIN_NAME "echo-e"\tsample: create-host-zone -n xxx.domain.com "return0;;esacdone:${DOMAIN_NAME:?Missing -n}awsroute53create-hosted-zone--name"${DOMAIN_NAME}."\--caller-reference"external-dns-test-$(date+%s)"localZONE_ID=$(awsroute53list-hosted-zones-by-name--outputjson\--dns-name"${DOMAIN_NAME}."--queryHostedZones[0].Id--outtext)localNS=$(awsroute53list-resource-record-sets--outputtext\--hosted-zone-id$ZONE_ID--query\"ResourceRecordSets[?Type == 'NS'].ResourceRecords[*].Value | []")echo'###'echo'# get bash function from here: https://panlm.github.io/CLI/awscli/route53-cmd/#func-create-ns-record-'echo'# copy below output to add NS record on your upstream domain registrar'echo'###'echo'DOMAIN_NAME='${DOMAIN_NAME}echo'NS="'${NS}'"'echo'curl -sL -o /tmp/func-create-ns-record.sh https://panlm.github.io/CLI/functions/func-create-ns-record.sh'echo'source /tmp/func-create-ns-record.sh'echo'create-ns-record -n ${DOMAIN_NAME} -s "${NS}"'echo''}
{"Comment":"Update record to add new TXT record","Changes":[{"Action":"UPSERT","ResourceRecordSet":{"Name":"@.panlm.com.","Type":"TXT","TTL":300,"ResourceRecords":[{"Value":"\"test1=1\""},{"Value":"\"test2=1\""}]}}]}