Can you use `count` and `for_each` on modules?

IntermediateConceptModules
Answer

Yes, since Terraform 0.13 for modules, giving module.app[0] or module.app["blue"]. It lets you stamp out an environment per key. Watch out: removing a key destroys everything inside that module instance, and modules that define their own provider blocks cannot be used with count/for_each.

All Terraform questions Roadmap: Terraform

More on Modules