All examples post a single comment on merge requests, which gets updated as more changes are pushed.
These examples work by using the default Infracost CLI option that parses HCL, thus a Terraform Plan JSON is not needed.
- Terraform/Terragrunt projects (single or multi): a repository containing one or more (e.g. mono repos) Terraform or Terragrunt projects
- Terraform/Terragrunt projects (using GitHub Actions cache): similar to the above example but uses the GitHub Actions cache to speed up the workflow run time
- Multi-projects using a config file: repository containing multiple Terraform projects that need different inputs, i.e. variable files or Terraform workspaces
- Slack: send cost estimates to Slack
These examples are for advanced use cases where the estimate is generated from Terraform plan JSON files.
- Terragrunt: Generate plan JSONs for a Terragrunt project
- Terraform Cloud/Enterprise: Generate a plan JSON for a Terraform project using Terraform Cloud/Enterprise
- Multi-project using parallel matrix jobs: Generate multiple plan JSONs for different Terraform projects using parallel matrix jobs
- Multi-Terraform workspaces using parallel matrix jobs: Generate multiple plan JSONs for different Terraform workspaces using parallel matrix jobs
- OPA: check Infracost cost estimates against policies using Open Policy Agent
- Sentinel: check Infracost cost estimates against policies using Hashicorp's Sentinel
See the contributing guide if you'd like to add an example.