Add Linux and macOS execution commands
Some checks failed
Repo Quality / structure (push) Has been cancelled

This commit is contained in:
Rodrigo Pace
2026-05-08 12:25:51 -03:00
parent 703e072682
commit 97cab6d894
5 changed files with 184 additions and 8 deletions

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
ENVIRONMENT="${1:-demo}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
TF_DIR="$REPO_ROOT/terraform/envs/$ENVIRONMENT"
if [[ ! -d "$TF_DIR" ]]; then
echo "Terraform environment not found: $TF_DIR" >&2
exit 1
fi
if ! command -v terraform >/dev/null 2>&1; then
echo "Terraform is not installed or not in PATH. Install Terraform 1.6+ and rerun this script." >&2
exit 1
fi
cd "$TF_DIR"
terraform fmt -recursive -check
terraform init -backend=false
terraform validate