From cff8f4a8d22d1153efc98c6d3cf44a5e8f987be8 Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Tue, 28 Sep 2021 18:54:33 +0000 Subject: [PATCH] variable ends with just the value of key 'PointInTimeRecoveryStatus' if it is ENABLED. --- checks/check_extra7151 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/checks/check_extra7151 b/checks/check_extra7151 index 7e58ac96..0d04a75a 100644 --- a/checks/check_extra7151 +++ b/checks/check_extra7151 @@ -30,11 +30,11 @@ extra7151(){ LIST_OF_DYNAMODB_TABLES=$($AWSCLI dynamodb list-tables $PROFILE_OPT --region $regx --query 'TableNames[*]' --output text) if [[ $LIST_OF_DYNAMODB_TABLES ]]; then for dynamodb_table in $LIST_OF_DYNAMODB_TABLES; do - POINT_IN_TIME_RECOVERY_ENABLED=$($AWSCLI dynamodb describe-continuous-backups $PROFILE_OPT --region $regx --table-name $dynamodb_table | jq '.[].PointInTimeRecoveryDescription | select(.PointInTimeRecoveryStatus=="ENABLED")') + POINT_IN_TIME_RECOVERY_ENABLED=$($AWSCLI dynamodb describe-continuous-backups $PROFILE_OPT --region $regx --table-name $dynamodb_table | jq '.[].PointInTimeRecoveryDescription | select(.PointInTimeRecoveryStatus=="ENABLED") | .PointInTimeRecoveryStatus') if [[ $POINT_IN_TIME_RECOVERY_ENABLED ]]; then textPass "$regx: $dynamodb_table has point-in-time recovery enabled." "$regx" "$dynamodb_table" else - textFail "$regx: $dynamodb_table does not have point-in-time recovery enabled." "$regx" "$dynamodb_table" + textFail "$regx: $dynamodb_table does not have point-in-time recovery enabled." "$regx" "$dynamodb_table" fi done else