Apply module to all available regions

Hi there,

I have created a module which I want to apply to all available/enabled regions. The AWS api call describe-regions gives you a list of enabled regions. Is it possible to use this list and apply the module to all those regions?

Currently I have to define the provider for each region and invoke them through a module for that region. Any tips appreciated :slight_smile:

Most resources allow you to specificy the region, overriding the provider’s region setting.
So you could use a for_each in the resources and loop over the available regions.

If you made the region list a parameter for the module, then it could also be used in a single-region deployment.

Module instantiation doesn’t support for_each - at least, not yet.