Skip to content

Commit

Permalink
adds quirks to make terraform plan less noisy
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Gohlke committed Oct 23, 2024
1 parent 03e80f6 commit 73291c0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ function tf_plan {
# shellcheck disable=SC2155
local output=$(mktemp)

if [[ $HOSTNAME =~ "bwpm-"* ]]; then
export CI=true
export CI_COMMIT_REF_NAME=$(git branch --show-current)
local remote=$(git config get branch.main.remote)
export CI_PROJECT_URL=$(git remote get-url "$remote" | sed -e 's|.*@ssh.||; s|:|/|; s|^|https://|; s|.git$||')
export CI_PROJECT_DIR=$(git rev-parse --show-toplevel)
fi

if ! terraform validate; then
echo "stopped on error"
return
Expand Down

0 comments on commit 73291c0

Please sign in to comment.