Skip to content

Commit

Permalink
update script
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Jun 14, 2021
1 parent e92e7d1 commit f266253
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion audit-output-creds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@ then
TERRAFORM="terraform"
fi

INFO="$1"
if [ -z $INFO ]
then
INFO="aws_info"
fi

DATE=$(date +%Y%m%d)
S_ACCOUNT=$($TERRAFORM output caller_account_id)
profile=$($TERRAFORM output profile)
#S_USER=$($TERRAFORM output scan_user)
S_FILE="/tmp/${S_USER}.${S_ACCOUNT}.$DATE.txt"

AWS_INFO=$($TERRAFORM output -json aws_info)
AWS_INFO=$($TERRAFORM output -json $INFO)
count=$(echo $AWS_INFO | jq -c 'keys' | sed -e 's/\[//' -e 's/\]//')
scount=0
while [ $scount -le $count ]
Expand Down

0 comments on commit f266253

Please sign in to comment.