This repository shows design patterns that we have found useful when writing Terraform modules. The patterns are not specific to any particular cloud provider, but the examples are written for Azure. The patterns are sometimes not the most efficient or beautiful way of doing things, but instead have been created with robustness in mind.
- Conditional resource or module instance
- Looping for resource blocks
- Looping for resources or modules
- Nested maps
- Passing references
These design practices have been developed by the following teams at Microsoft:
- Azure Landing Zones
- Azure Verified Modules
- Azure Terraform Engineering