Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug terraform

Tunning terraform apply is giving the following error.

╷
│ Error: Missing required argument
│
│ The argument "domain" is required, but was not set.

I searched all my project folders including the files in .terraform folder, but I could not locate that variable.

How do I know which terraform script was giving that error?

like image 568
Tom Avatar asked May 09 '26 18:05

Tom


1 Answers

  1. If you need to enable debug in terraform, add TF_LOG=debug before normal terraform commands in Linux, such as:

    TF_LOG=debug terraform plan
    
  2. For your issue, you miss to feed the variable value. Try:

    terraform plan -var domain=xxxx
    
like image 121
BMW Avatar answered May 15 '26 00:05

BMW