5 Key Best Practices for Sane and Usable Terraform Setups

Working with Terraform, an open-source infrastructure as code software tool, for over five years has taught me some key lessons. Here are five practices that have been critical to having a sane and usable Terraform setup, regardless of the size of the team or the nature of the project.

1. Know Your Target Audience

This one might seem obvious, but I’ve seen it go wrong several times. When organizing Terraform code, either standardizing the directory structure or defining naming conventions, it’s vital to consider the intended audience. Will your team be using these Terraform scripts and modules? Are you handing the work over to another team? Will new people be joining your team sooner or later? Are you working on this project solo? Will you be using this setup in 6 months or a year, or will it be assigned to someone else?