hands-on lab

Troubleshooting Terraform Environments

Up to 45m
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.


As an application grows, Terraform developers can ensure their reusable templates are being used properly by incorporating custom validation on resource attributes. As the infrastructure is deployed and configured further, enabling logs can provide additional warnings or tracebacks to help pinpoint the root of a particular issue.

In this lab, you will enable logging in Terraform and learn the various log levels available for debugging. You will also employ the Terraform replace option to force a resource replacement for any misconfigured or misaligned cloud resources.

Learning Objectives

Upon completion of this beginner-level lab, you will be able to:

  • Identify and configure logs for Terraform troubleshooting
  • Validate Terraform variables
  • Replace misconfigured AWS resources

Intended Audience

  • Cloud Architects
  • DevOps Engineers
  • Software Engineers


Familiarity with the following will be beneficial but is not required:

  • Terraform Logging
  • Troubleshooting Terraform applications

The following content can be used to fulfill the prerequisite:

About the author

Jun Fritz, opens in a new tab
Cloud Labs Developer
Learning paths

Jun is a Cloud Labs Developer with previous experience as a Software Engineer and Cloud Developer. He holds the AWS Certified Solutions Architect and DevOps Engineer Professional certifications. He also holds the AWS Certified Solutions Architect, Developer, and SysOps Administrator Associate certifications. 

Jun is focused on giving back to the growing cloud community by sharing his knowledge and experience with students and creating engaging content. 

Covered topics

Lab steps

Configure Terraform AWS Credentials
Configuring Logs in Terraform
Creating Custom Validation in Terraform
Forcing Re-creation of Terraform Resources