IssueRaiser

Ability to pass providers to modules in for_each

### Use-cases <!--- In order to properly evaluate a feature request, it is necessary to understand the use-cases for it. Please describe below the _end goal_ you are trying to achieve that has led you to request this feature. Please keep this section focused on the problem and not on the suggested solution. We'll get to that in a moment, below! --> I'd like to be able to provision the same set of resources in multiple regions a `for_each` on a module. However, looping over providers (which are tied to regions) is currently not supported. We deploy most of our infra in 2 regions in an active-passive configuration. So being able to instantiate both regions using the same module block would be a huuuge win. It's also our primary use case for for_each on modules being implemented in https://github.com/hashicorp/terraform/issues/17519. ### Proposal <!--- If you have an idea for a way to address the problem via a change to Terraform features, please describe it below. In this section, it's helpful to include specific examples of how what you are suggesting might look in configuration files, or on the command line, since that allows us to understand the full picture of what you are proposing. If you're not sure of some details, don't worry! When we evaluate the feature request we may suggest modifications as necessary to work within the design constraints of Terraform Core. --> Proposed syntax from @jakebiesinger-onduo ```tf provider "google" { alias = "goog-us-east1" r

Posted by mightyguava on Mar 26, 2020, 10:14 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

github (E-commerce)

Ability to pass providers to modules in for_each

mightyguavaMar 26, 2020, 10:14 PM

### Use-cases <!--- In order to properly evaluate a feature request, it is necessary to understand the use-cases for it. Please describe below the _end goal_ you are trying to achieve that has led you to request this feature. Please keep this section focused on the problem and not on the suggested solution. We'll get to that in a moment, below! --> I'd like to be able to provision the same set of resources in multiple regions a `for_each` on a module. However, looping over providers (which are tied to regions) is currently not supported. We deploy most of our infra in 2 regions in an active-passive configuration. So being able to instantiate both regions using the same module block would be a huuuge win. It's also our primary use case for for_each on modules being implemented in https://github.com/hashicorp/terraform/issues/17519. ### Proposal <!--- If you have an idea for a way to address the problem via a change to Terraform features, please describe it below. In this section, it's helpful to include specific examples of how what you are suggesting might look in configuration files, or on the command line, since that allows us to understand the full picture of what you are proposing. If you're not sure of some details, don't worry! When we evaluate the feature request we may suggest modifications as necessary to work within the design constraints of Terraform Core. --> Proposed syntax from @jakebiesinger-onduo ```tf provider "google" { alias = "goog-us-east1" r

Comments (0)

No comments yet. Start the discussion.

Comment on this issue