#!/usr/bin/env bash
set -Eeuo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
cd ../

terraform fmt -check=true -diff=true || {
  echo "Terraform files are unformatted. To fix it, run:"
  echo "  terraform fmt"
  exit 1
}
