Terraform show syntax


I am wondering why the output of terraform show only almost corresponds to that of Terraform configuration files. I have read the documentation on terraform import and understand that there currently isn’t any dedicated tool to create the Terraform configuration for imported resources, but when I discovered that terraform show does this quite well already, I was relieved nonetheless.

One example where the output of terraform show deviates from the Terraform syntax is when it comes to heredoc string literals. In the Terraform syntax these start with <<TAG or <<-TAG and in the terraform show syntax they start with <<~TAG. Since the string literal body indeed is indented it corresponds to <<-TAG. If you think this is just an oversight, I would be glad to report an issue for it.


Hi @knutwannheden! You’re right, this was a bug in the terraform show output. A community member noticed this too and submitted a PR, which we merged and will release with the upcoming 0.14.0 release.