Terraform Infrastructure as Code: Best Practices and Common Mistakes
summary
Declares concrete rules: always use backend state from the beginning and run Terraform from CI/CD with forced plan and approval; toggle environment differences with booleans and count or dynamic blocks (dynamic requires map inputs) and prefer try() for optional module fields; create a module only after at least two consumers, version modules and pin dependencies, keep feature branches short (typically under a day), and avoid using Terraform for VM configuration management instead use Ansible/Chef/Puppet and Packer for images.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 0:25Who am I
- 2:13Terminology
- 4:34How Terraform Works
- 6:08Terraform Project Structure
- 8:05Terraform Project Patterns
- 10:14Terraform Environments
- 12:10Try Function
- 13:31Audit History
- 15:09Evolution
- 16:39Feature branching
- 17:54Manual approvals
- 18:51Module Creation
- 20:13Thin proxies
- 20:58Inappropriate lookups
- 22:02Undocumented modules
- 22:59Unplanned work
- 23:52Hammer and nail problem
- 25:31Outro
related talks
10mInfrastructure as a Code Best Practices with Terraform
58mTerraform: Uncovering Best Practices for Building Modules
35mTerraform Practices - The Good, the Bad and the Ugly
30mTerraform Practices to Enable Infrastructure Scaling
29mTerraform Practices - The Good, the Bad, and the Ugly
19mInfrastructure as Code: A Must Know Skill for Today's Developers
50mDescribing Infrastructure in Terraform for the Future
48mCodifying Infrastructure with Terraform for the Future
