Include verbose output in terraform/terragrunt Is there any way to include verbose / debugging output in Terraform / Terragrunt?
I'm new to the language, and often struggle with knowing exactly what's going on.  It would be helpful for me to be able to inspect certain values; e.g. to confirm that locals &amp; variables have the values I expect, to get the ids of created components, etc.
I can include such info by creating outputs and assigning values there; but if I'm debugging a module I then have to include the output in the module's output, and again in the calling code's output for it to be visible; then have to delete those entries before delivering the solution.
I'd like a solution more like C#'s Debug.WriteLine(/*...*/) or PowerShell's Write-Verbose #... i.e. somewhere I can say what value I'd like to inspect, but have that output only show in the terminal when run with verbose output enabled, so these statements can be toggled on when needed, rather than impacting the delivered solution.
Does anything like this exist in the language?  So far I've found nothing documented or by Googling.
Note: The TF_LOG environment variable documented here is helpful for providing more info on what's going on under the covers; but only allows you to see predefined output; not to push your own content to the output stream.
You might be able to do something with the local-exec Provisioner to push the information out to an external script or file which you could monitor separately during the run.
The issue you might encounter is the run order, HCL isn't processed top to bottom like a &quot;traditional&quot; programming language, it works out a dependency tree for the resources it is creating, so might not run the local-exec when you'd expect them to be run.