check26 - on failure, output info and not failure

(cherry picked from commit f80c2e28b72495ca7f60fd0ab58a51d40640a86a)
This commit is contained in:
Nimrod Kor
2020-03-22 10:53:47 +02:00
parent 530bacac5b
commit b704568b23

View File

@@ -29,7 +29,7 @@ check26(){
if [ "$CLOUDTRAIL_ACCOUNT_ID" == "$ACCOUNT_NUM" ]; then
CLOUDTRAILBUCKET_LOGENABLED=$($AWSCLI s3api get-bucket-logging --bucket $bucket $PROFILE_OPT --region $REGION --query 'LoggingEnabled.TargetBucket' --output text 2>&1)
if [[ $(echo "$CLOUDTRAILBUCKET_LOGENABLED" | grep AccessDenied) ]]; then
textFail "Access Denied Trying to Get Bucket Logging for $bucket"
textInfo "Access Denied Trying to Get Bucket Logging for $bucket"
continue
fi
if [[ $CLOUDTRAILBUCKET_LOGENABLED != "null" ]]; then