You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Step-03: Setup these Environment Variables permanently in your desktops
Linux Bash
Open your .bashrc which is located in your $home directory
# Linux Bash
cd $HOME
vi .bashrc
# Terraform log settings
export TF_LOG=TRACE
export TF_LOG_PATH="terraform-trace.log"# Verify after saving the file in new terminal
$ echo $TF_LOG
TRACE
$ echo $TF_LOG_PATH
terraform-trace.log
Windows Powershell
Setup using Powershell profile
Open $profile command in a PowerShell
Once that file is opened add the following lines.
Now close and reopen the console and type the following to verify that it worked.
# Windows Powershell - Terraform log settings$env:TF_LOG="TRACE"$env:TF_LOG_PATH="terraform.txt"# Open new powershell window & Verify
echo $env:TF_LOG
echo $env:TF_LOG_PATH
MAC OS
Update the values in .bash_profile at the end of file
# MAC OS
cd $HOME
vi .bash_profile
# Terraform log settings
export TF_LOG=TRACE
export TF_LOG_PATH="terraform-trace.log"# Verify after saving the file in new terminal
$ echo $TF_LOG
TRACE
$ echo $TF_LOG_PATH
terraform-trace.log
Step-04: Terraform Crash Log
If Terraform ever crashes (a "panic" in the Go runtime), it saves a log file with the debug logs from the session as well as the panic message and backtrace to crash.log.
Generally speaking, this log file is meant to be passed along to the developers via a GitHub Issue.
As a user, you're not required to dig into this file.