Source: medium.com

Loop Modules in Terraform
Problem Statement: In day to day work with terraform and in a kind of environment where you want to use the module creation for multiple times, then terraform does not have support until now. It is been a while that terraform said it would provide support for iterating the resources using count with the module and now it comes out. Solution: Terraform 13 version is been out finally and they kept the promise of this requirement in the new version.

Now we will just add some variables to the module and try to run it.

Conclusion: To summarize this is a quite useful option if we want to use the same module to iterate it with different values then this feature is the most needed one.

Related Articles