platform-infra/scripts/plan.sh

8 lines
310 B
Bash
Executable file

#!/bin/bash
# Wrapper around terraform plan with colour output and cost estimation.
set -euo pipefail
ENV="${1:?Usage: plan.sh <staging|prod>}"
cd "$(dirname "$0")/../terraform/envs/$ENV"
terraform init -input=false
terraform plan -out=tfplan -input=false
echo "[plan] Run './scripts/apply.sh $ENV' to apply."