I have set up an automation through github/jenkins to post the output of terraform plan for the repo through jenkins as a comment to the pull request in github. The entire orchestration works great except for the fact that the output of terraform plan is not that human readable and doesn't provide you in this kind of automation a way as it looks when you run it in a terminal. I used several ways like using terraform show for the plan file, then grabbing that to a custom file and posting that as a comment in GitHub PR. In every case the output contains some binary characters.
i even used the terraform-plan-parser https://github.com/lifeomic/terraform-plan-parser but that doesn't work for terraform 0.12 and relates to the below issue :- https://github.com/lifeomic/terraform-plan-parser/issues/31
What's the best way to retrieve the output of any terraform plan in automation so that it can be referenced however that needs to be to inspect before the apply is done. Looks to me it only works great in a terminal.
Any help or suggestions here will be greatly appreciated as always.