Terraform Best Pratices: Defining Modules

Modularity in programming is a crucial capability for creating extensible and reusable pieces of code. It helps to reduce the volume of code, which promotes maintainability. It takes many forms, from initially establishing functions, subroutines, and methods, to bundling them into libraries, packages, or modules that are redistributable. In Terraform, there are two forms of … Continue reading Terraform Best Pratices: Defining Modules

Terraform Best Practices: Versioning

Versioning is an important topic when authoring any kind of code, and Terraform is no exception. We'll discuss the best practices for versioning Terraform code. We'll also discuss how to use versioning to manage the lifecycle of your infrastructure. Problems Versioning has presented challenges for many platforms and it includes aspects of managing dependencies and … Continue reading Terraform Best Practices: Versioning

Terraform Best Practices: Files

A fantastic feature of Terraform is that the code is simply a set of files in a directory with the *.tf extension (or the *.tf.json extension). It doesn't include subdirectories and we would call this our "working directory" when we're using our code editor or we're in the shell. We can check the directory with … Continue reading Terraform Best Practices: Files

Terraform Best Practices: Do Not Hard Code Values

I want to start capturing some best practices with the intent of keeping them simple and slowly building them up in the coming weeks. I get to observe so many people learn Terraform and I see patterns emerge as better understanding occurs. How I get to observe people learn Terraform: My primary role at CDW … Continue reading Terraform Best Practices: Do Not Hard Code Values