summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteph Enders <steph@senders.io>2023-12-28 07:44:17 -0500
committerSteph Enders <steph@senders.io>2023-12-28 07:44:17 -0500
commit78407ab1f8f0e5a2fd2d37e1a25aad8cff5f3759 (patch)
treed378753e1d50e5dfce3d2741c84d48826637c235
parent839cace80067942977dcb8ecccb3d4655eb4c781 (diff)
Fix missing part of post body JSON
Was missing the { } inside the change array to define the change object
-rwxr-xr-xupdate.sh21
1 files changed, 12 insertions, 9 deletions
diff --git a/update.sh b/update.sh
index d67006d..dfe0a5d 100755
--- a/update.sh
+++ b/update.sh
@@ -33,19 +33,22 @@ if [ "$config_ip" != "$actual_ip" ]; then
cat <<EOF > $RECORD_CHANGE_JSON
{
"Changes": [
- "Action": "UPSERT",
- "ResourceRecordSet": {
- "Name": "$DOMAIN",
- "Type": "A",
- "TTL": 300,
- "ResourceRecords": [
- "Value": "$actual_ip"
- ]
+ {
+ "Action": "UPSERT",
+ "ResourceRecordSet": {
+ "Name": "$DOMAIN",
+ "Type": "A",
+ "TTL": 300,
+ "ResourceRecords": [
+ "Value": "$actual_ip"
+ ]
+ }
}
]
}
EOF
- aws route53 change-resource-record-sets --hosted-zone-id $HOSTED_ZONE_ID \
+ aws route53 change-resource-record-sets \
+ --hosted-zone-id $HOSTED_ZONE_ID \
--change-batch $RECORD_CHANGE_JSON
else