Skip to Content

Cloud Economics and Terraform; How to start

Peter Rombouts
September 10, 2021

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 $100k

https://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:

GitHub example

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!

Concluding

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!

About the author

Senior Technology Consultant | Netherlands
Peter Rombouts is a Multi Cloud Solution Architect (Azure and AWS) with a strong focus on the Microsoft Azure platform. Supporting enterprise organisations in the Netherlands as consultant, lead developer and architect. Currently employed as a SIG Certified software consultant, Microsoft Certified Azure Architect, AWS Certified Solution Architect and certified Scrum Master in the Netherlands.

    Comments

    One thought on “Cloud Economics and Terraform; How to start

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Slide to submit