Terraform plan output as azure devops PR comment

I am using terraform to configure our Azure Traffic Manager profiles using it through Azure DevOps pipeline. One of the goal is to get the terraform plan command output as the PR comment. I am using the “Create PR Comment task” to post the output as the PR comment. It is working but I am missing the format and is appearing in a not easily readable form.

Has anyone have any suggestions or workaround for this?

Hi, I solved a very similar issue in my project by developing a simple script. It adds a comment to PR and is triggered every new push. Resolving comments is a mandatory step, so you get an additional “I know what will be deployed” check!

Better Dev/Sec/Platform Ops in Azure – Kamil Wiecek