Skip to content

Instantly share code, notes, and snippets.

@langheran
Last active July 7, 2025 17:01
Show Gist options
  • Save langheran/729341760d1d3c67adeafb49026ad6e9 to your computer and use it in GitHub Desktop.
Save langheran/729341760d1d3c67adeafb49026ad6e9 to your computer and use it in GitHub Desktop.
C:\Users\NisimHurst\NDS\scripts\cmds\tfi.cmd
@echo off
setlocal
@REM set TF_LOG=DEBUG
set ENV=qa
IF NOT EXIST "%CD%\backends" (
echo "No backends directory found. Using default backend configuration."
terraform init -reconfigure -upgrade
) ELSE (
echo "Using backend configuration from backends/%ENV%.tfbackend"
terraform init -reconfigure -upgrade -backend-config=./backends/%ENV%.tfbackend
)
endlocal
echo %time%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment