Skip to content

Commit

Permalink
fix more typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Dec 19, 2024
1 parent b64c9b6 commit b86342a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/check_terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ jobs:

- name: Check terrorm in ${{ matrix.target.name}}
working-directory: terraform/subscriptions/scripts
run: SUBSCRIPTION=${{ matrix.target.subscription}} ENVIRONMENT=${{matrix.target.folderName}} ./terraform.sh
shell: bash
env:
SUBSCRIPTION: ${{ matrix.target.subscription}}
ENVIRONMENT: ${{matrix.target.folderName}}
run: ./terraform.sh

- name: Revoke GitHub IP on StorageAccount
if: ${{ steps.update_firewall.outcome == 'success' && !cancelled()}} # Always run this step even if previous step failed
Expand Down
12 changes: 5 additions & 7 deletions terraform/subscriptions/scripts/terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ grn=$'\e[1;32m'
yel=$'\e[1;33m'
normal=$(tput sgr0)

if [[ -z "$ENVIROMENT" ]]; then
echo "ERROR: Please provide ENVIROMENT" >&2
if [[ -z "$ENVIRONMENT" ]]; then
echo "ERROR: Please provide ENVIRONMENT" >&2
exit 1
fi

Expand All @@ -14,12 +14,10 @@ if [[ -z "$SUBSCRIPTION" ]]; then
exit 1
fi



# Set the directory you want to search
# directory="../${SUBSCRIPTION}/${ENVIROMENT}"
# directory="../${SUBSCRIPTION}/${ENVIRONMENT}"
# directory="../s940/dev/"
directory="../${SUBSCRIPTION}/${ENVIROMENT}"
directory="../${SUBSCRIPTION}/${ENVIRONMENT}"

for dir in "$directory"/*; do
if [ ! -d "$dir" ]; then continue; fi
Expand Down Expand Up @@ -48,4 +46,4 @@ for dir in "$directory"/*; do
if [ -n "$replace" ]; then echo -e "The following resources will be replaced:\n ${red}${replace}${normal}\n"; fi
if [ -z "$create$destroy$update$replace" ]; then echo -e "No changes. Your infrastructure matches the configuration.\n"; fi
rm "$dir/plan.out"
done
done

0 comments on commit b86342a

Please sign in to comment.