Pretty self explanatory I guess. Is there any way to do what’s described in the title? terraform state show
and terraform state list
only target resources. Can I inspect the values of module variables and outputs somehow?
This would be extremely handy for debugging purposes.
I have half an answer.
You can inspect a module’s outputs using terraform console
, but not the module variables.
For example, if I have a module called “test” with an output called “example”, I can inspect that by running echo module.test.example | terraform console
.
There’s nothing in the console
to help with the module variables, but as a workaround while debugging you could add a module output with a value of the variable you want to inspect, and then inspect the output.
1 Like