Skip to content
Commits on Source (2)
0.1.0
\ No newline at end of file
......@@ -2,3 +2,8 @@
set -eu
command -v terraform >/dev/null || { echo "Can't find the terraform binary, aborting." >&2; exit 1; }
for i in "$@"
do
terraform fmt "$(dirname "$i")" || true
done
......@@ -2,3 +2,14 @@
set -eu
command -v terraform >/dev/null || { echo "Can't find the terraform binary, aborting." >&2; exit 1; }
export TF_INPUT='0'
export TF_IN_AUTOMATION='1'
for i in "$@"
do
terraform init -backend=false "$(dirname "$i")" || { code='1'; continue; }
terraform validate "$(dirname "$i")" || code='1'
done
exit "${code:-0}"