- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
Enable Debug Logging for Terraform
Hey there, Gurus! Welcome to the lab! This lab will demonstrate how to enable debug logging in Terraform, which can be used to further look into an issue with Terraform and to give information to HashiCorp when submitting a bug report. Let the bug reporting begin!
Lab Info
Table of Contents
-
Challenge
Enable Debug Logging
- In the terminal, once you're logged in to your instance, change to the
Enable_Debug_Loggingdirectory. - In the
Enable_Debug_Loggingdirectory, edit thevariables.tffile and add in youramiandsubnet_idfrom theresource_ids.txtfile. - In the
Enable_Debug_Loggingdirectory, create a directory calledlogs. - Enable Terraform debug logging.
- Set the logging path to a file called
terraform_logs.txtin yourlogsdirectory. - Initialize your working directory.
- Check the Terraform version.
- Deploy your resources.
- In the terminal, once you're logged in to your instance, change to the
-
Challenge
Confirm the Log was Written to the Directory
- Check your
logsdirectory for the theterraform_logs.txtfile. - Examine the log file.
- Check your
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.