From 78407ab1f8f0e5a2fd2d37e1a25aad8cff5f3759 Mon Sep 17 00:00:00 2001 From: Steph Enders Date: Thu, 28 Dec 2023 07:44:17 -0500 Subject: Fix missing part of post body JSON Was missing the { } inside the change array to define the change object --- update.sh | 21 ++++++++++++--------- 1 file 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 < $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 -- cgit v1.2.3-54-g00ecf