Skip to main content


Infracost Cloud Guardrails have native support for Slack notifications that trigger when your defined thresholds are exceeded. If you are not using that feature, you can post cost estimates to Slack by following these steps in your CI/CD system:

  1. Create a Slack Webhook in your workspace.
  2. Use the infracost output --format slack-message command to produce a Slack-flavored Markdown message. Slack message blocks have a 3000 char limit so the Infracost CLI automatically truncates the middle of the slack-message output format if required.
  3. Post the message to Slack using curl from your CI/CD system. See this example for how to do this in GitLab, the same bash commands can be used in other systems.

If you run into any issues, please join our community Slack channel, we'll help you very quickly 😄

Example Infracost diff output