Get tips for making the most of Terraform when scaling your infrastructure as your organization grows.
In this talk (video below), Hila Fish, an engineer at Wix, covers practices put together with blood, sweat, and tears to give you a paved path to make the most of your work with Terraform.
While learning what practices are most safe and efficient for your own company will take experimentation, this talk should help lead you down the right path by providing some broadly applicable advice and giving guidance on quick wins, practices that should become second nature, and patterns for scalability in the long haul:
Version lock - for Terraform versions, modules, and providers
Tagging resources
Remote state usage
Use verified community modules where possible
Use env vars
and tfvars
when necessary, de-hardcode one-time names, keep things generic
File structure - Read: Refactor Monolithic Terraform Configuration
Applying classic code best practices - Read: The Pragmatic Programmer
Structuring your TF code base (workplace usage) - Read: Module Creation - Recommended Pattern
Terraform execution - Read: Running Terraform in Automation
Practices enforcement - Read: Policy as Code