Starting simpler with Terraform

Adrian Macal
Oct 31, 2020

Resources are provisioned every day. Terraform is great tool to start it without learning complex things first. Unfortunately the complexity might be brought by you. Here are my tips which may help you avoid over-engineering it.

Start small

If you start new project, bootstrap it with single file and put everything there.

Use backend

Keeping state locally or in your git repository does not pay off. Better use your cloud infrastructure as your state storage, by adding just three lines of code.

Use makefile

You can call Terraform directly or manage it with Makefile. The latter makes your life simpler, because you do not need to pass all parameters every time.

Create modules

It comes time when you cannot put more into single file. Modules are unavoidable. Modules introduce minimum abstraction to will reduce complexity if applied at the right time and not earlier. Introduce them one by one when you start getting the clear picture where are you going.

--

--

Adrian Macal

Software Developer, Data Engineer with solid knowledge of Business Intelligence. Passionate about programming.