fix: correct invoke aws cli for aws ddns

This commit is contained in:
Price Hiller 2023-04-01 19:29:30 -05:00
parent d3a4db811d
commit c4084f9925
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8

View File

@ -1,4 +1,6 @@
#!/bin/bash
#!/bin/bash -eu
set -o pipefail
HOSTED_ZONE_ID="/hostedzone/Z00026583L98XLGPBWMM8"
@ -28,7 +30,7 @@ echo \
"Issuing command:
aws route53 change-resource-record-sets --hosted-zone-id ${HOSTED_ZONE_ID} --change-batch json-data-update(see script)"
result="$(aws route53 change-resource-record-sets --hosted-zone-id "${HOSTED_ZONE_ID}" --change-batch "${resource_update}")"
result="$(aws --no-cli-auto-prompt route53 change-resource-record-sets --hosted-zone-id "${HOSTED_ZONE_ID}" --change-batch "${resource_update}")"
echo \
"Current Record Status:
$(jq '.ChangeInfo.Status' <(echo "${result}"))"
@ -36,4 +38,4 @@ echo \
current_time="$(date +%Y-%m-%dT%H:%M:%S)"
cat << EOF >> DDNS_Updates.log
DDNS Update made @ ${current_time}
EOF
EOF