I am nearly done with Terraform Basics Training Course by Vijin Palazhi. I just learnt about modules. In the example, several directories are created to create different instances of a module payroll app across regions. Why would you do this vs, just using foreach in real life?
Alternatively, why not deploy a single app with a repeated infrastructure across regions?
I’ve now learnt about Workspaces, that makes a lot of sense and offers a neat solution.
I’d be very grateful if people could describe when they would use Workspaces vs. single deployment (no workspaces, just iterating through all the regions and their corresponding config) vs forking (new instance of the module in a new folder) in the real world