diff options
author | Steph Enders <steph@senders.io> | 2023-12-28 07:44:17 -0500 |
---|---|---|
committer | Steph Enders <steph@senders.io> | 2023-12-28 07:44:17 -0500 |
commit | 78407ab1f8f0e5a2fd2d37e1a25aad8cff5f3759 (patch) | |
tree | d378753e1d50e5dfce3d2741c84d48826637c235 | |
parent | 839cace80067942977dcb8ecccb3d4655eb4c781 (diff) |
Fix missing part of post body JSON
Was missing the { } inside the change array to define the change object
-rwxr-xr-x | update.sh | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -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 |