You're unable to read via this Friend Link since it's expired. Learn more
Member-only story
Infracost + Terraform + GitHub Actions = Automate Cloud Cost Management
How to use Infracost as the guardrail to manage cloud cost during Terraform development

Democratizing DevOps, DevOps self-service, you may have heard of these terms. This is a DevOps trend from recent years largely stemmed from the need to support cloud-native architecture and development. DevOps should not be the bottleneck to releasing its services to the development teams so developers can self-service their applications regarding infrastructure CI/CD and application CI/CD.
“But there are risks associated with such DevOps self-service,” you immediately respond! What if a developer fat-fingers their Terraform configuration? Large organizations with large development teams and micromanaging each team’s IaC code to ensure they are not breaking the bank could be daunting!
How can we manage such DevOps self-service with peace of mind?
Good question! Let’s dive in!
Automating Cloud Cost Management
Picture this:
- A developer makes changes to their Terraform configuration, and they submit a pull request.
- This pull request auto triggers a CI workflow, which calculates the cloud cost difference before and after their changes. It nicely displays the cost difference in a table format as a pull request comment, with a detailed drill-down on where the cost change occurs.
- If the monthly cloud cost change exceeds your predefined policy threshold, your workflow fails for further examination to ensure there is no human error in your Terraform configuration.
- The workflow can also generate an HTML report on the cloud cost for the infrastructure with the latest changes.
- You and/or the developer get an email notification with this report attached. See a sample report from our demo app below:

So, within seconds, you and/or the developer get the cloud cost report directly delivered to your email inbox…