https://infracost.io logo
#help
Title
a

acceptable-tent-42612

09/18/2023, 6:32 PM
Hi everyone. Does
infracost comment
for Azure DevOps integration supports the slack message format in some way? The issue I'm facing is: • Azure DevOps has a webhook to a slack channel and all PR comments are posted to a slack channel. • Problem: The comment posted in Azure DevOps is in table format. Slack does not support the table format, which shows the example output. For example:
Copy code
Comment:
[//]: <> 
<> Infracost estimate: <b>monthly cost will increase by $1</b></p>
<table>
<thead>
  <td>Project</td>
  <td>Cost change</td>
  <td>New monthly cost</td>
</thead>
...
Is there a way I can still leverage
infracost comment az-repo
and post a comment with slack-message format?
l

little-author-61621

09/18/2023, 6:39 PM
Hi @acceptable-tent-42612 this isn't something that is supported. I think the best way to do this at the moment would be to run
infracost output
in the pipeline to output to the slack message format and then curl the webhook endpoint from the pipeline. Similar to this GitLab example: https://gitlab.com/infracost/infracost-gitlab-ci/-/tree/master/examples/slack
a

acceptable-tent-42612

09/18/2023, 6:40 PM
Thanks for confirming !
l

little-author-61621

09/18/2023, 6:43 PM
No problem!
3 Views