How To Improve Flexibility Using Terraform Variables, Dependencies, and Conditionals
Hashicorp Configuration Language (HCL), which Terraform uses, like other programming languages provides a few different types of loops. In this article, we’ll review the data structures HCL provides, its looping features for resources (the count key, for_each, and for), writing conditionals to handle known and unknown values, as well as explicitly specifying dependency relationships between resources.