Hi @kevingunn-wk! Thanks for this feedback.
terraform test command as currently implemented is performing essentially the same steps that
terraform plan and
terraform apply would, but is doing them at a different level of abstraction than just running those commands separately and so unfortunately it’s not straightforward for it to just reproduce the output those commands would’ve produced. However, it does seem possible for it to show similar information in principle, because it has access to all the same data that those commands can access.
With that said, with the testing experiment as it currently exists you could potentially run
terraform test with the environment variable
TF_LOG=debug set and then you’ll see Terraform’s internal debug logging. Those logs are intended to help with developing Terraform itself rather than with debugging Terraform modules, but if you can read through the “noise” then you can hopefully get a sense of what exactly failed.
Another way to go, which is actually probably the more direct answer to your suggestion, is to switch into the directory containing your test configuration and then use the normal Terraform commands in there, since the test configuration is itself a valid Terraform configuration:
# (and then once you're done debugging)
Unfortunately we had to shift our focus away from the testing experiment for the moment and so I’m still collecting and recording feedback but we aren’t currently actively developing a new iteration. However, I am looking forward to returning to this for a second iteration based on the great feedback a bit later in the year, so thanks for sharing this!