Starting simpler with Terraform

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.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store