You need detailed diagnostic output from Terraform and want it written to a file. What should you set?
- A.
Add
debug = trueto theterraformblock. - B.
Run
terraform fmt -debug. - C.
The
TF_LOGenvironment variable to a level such asDEBUG, andTF_LOG_PATHto the file. - D.
Delete the
.terraformdirectory.
Show answer and explanation
Answer: C
TF_LOG enables logging at a chosen verbosity, and TF_LOG_PATH sends it to a file.
- Add
debug = trueto theterraformblock.: No such setting exists. - Run
terraform fmt -debug.:fmthas no debug option. - Delete the
.terraformdirectory.: That removes cached plugins and doesn't produce logs.