Hey there, Gurus! Welcome to the lab! This lab will demonstrate how to troubleshoot a Terraform variable interpolation error. We will attempt to go through the different stages of deployment to try and deploy our configuration and work through the interpolation error until we have successfully deployed our resources.
Successfully complete this lab by achieving the following learning objectives:
- Format Your Terraform Configurations
1) In the terminal, once logged into your instance, change to the
2) In the
terraformdirectory, edit the
main.tffile and add in your
3) Run the
- Fix the Interpolation Error
1) After running the
terraform fmtcommand, you should get an error. Read the error and go to the line in the
main.tffile where the error is.
2) Fix the syntax error for the tag name variable.
terraform fmtcommand. If the error is fixed, then move on to the next stage in your deployment until all of your resources are deployed successfully.
4) Once your resources are deployed without any errors, the lab is then complete.