#!/bin/bash
########### CODEBUILD CONFIGURATION ##################
# shellcheck disable=SC2034
## Collect environment parameters set by buildspec
CHECKGROUP=${PROWL_CHECK_GROUP}

if [ "none" == "${PROWL_MASTER_ACCOUNTS}" ]; then
  ORG_MASTERS=""
else
  ORG_MASTERS=$(echo "${PROWL_MASTER_ACCOUNTS}" | tr "," " ")
fi

if [ "none" == "${PROWL_STANDALONE_ACCOUNTS}" ]; then
  STANDALONE_ACCOUNTS=""
else
  STANDALONE_ACCOUNTS=$(echo "${PROWL_STANDALONE_ACCOUNTS}" | tr "," " ")
fi

if [ "none" == "${PROWL_SKIP_ACCOUNTS}" ]; then
  SKIP_ACCOUNTS_REGEX='^$'
else
  skip_inside=$(echo "${PROWL_SKIP_ACCOUNTS}" | tr "," "|")
  # shellcheck disable=SC2116
  SKIP_ACCOUNTS_REGEX=$(echo "(${skip_inside})" )
fi

AUDIT_ROLE=${PROWL_AUDIT_ROLE}

# Adjust if you clone prowler from somewhere other than the default location
PROWLER='prowler/prowler'

# Change this if you want to ensure it breaks in code build
CREDSOURCE='EcsContainer'
