Originally posted on SogetiLabs:
It is really easy to blow all your budget when you do not know the impact of the choices you make in the cloud. And while there are many tools available to run analysis on your bill, or showing where your money went, would it not be smarter to shift everything left?
34 per cent of large enterprises set a budget of at least $10m a year while 62 per cent of small business went for under $100k. Of those spanking between $2m and $10m on the cloud, almost half overspent (compared to 27 per cent of those budgeting until $100khttps://www.hashicorp.com/blog/cloud-budgets-busted-almost-40-overspent-last-year
In a race for speed of delivery, putting restrictions on cloud environments can be contra-productive. On the other hand money can fly out the window if you do not keep everything in check. So what is the solution?
Training and Awareness
First of all it should be obvious that anyone involved in cloud project should also be trained appropriately. Part of our work as consultants and architects is to also include the running and operational costs of a cloud solution. But to sometimes the costs can sneak into a project, especially when using systems like Kubernetes or any other cluster based system. These can have high impact on your costs because the VMs underneath those systems can be costly to run.
Automate, automate and automate!
In comes Infracost. This really great open source tool has many integrations with CICD systems and can be simply added to your Azure DevOps, Gitlab or GitHub flows (and many more).
Infracost calculates cloud costs based on Terraform. Cost estimates can be shown in the terminal or put in pull requests using our CI/CD integrations. This helps you understand the cost of services before you use them, and take action to optimize costs within your existing workflow.https://www.infracost.io
The tool can add a simple cloud estimation to your pipelines, and this will make your DevOps teams instantly see the changes their code have on the bill and your project:
How to get started
The documentation of the tool is great, and many examples for the most used CICD tools are documented at https://www.infracost.io/docs/integrations/cicd. Did I mention they have a free Community version available? This means you can start, right now, with using and testing this tool!
In the end it is not about tooling, it all starts with training and awareness. But it is better to check than to get caught by a surprise when the bill comes in. This tool by Infracost is a really great way to start tracking your costs and estimates at the earliest stage in development as possible, give it a spin!