Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module does not support for_each due to hard coded providers #48

Open
heathsnow opened this issue Jun 3, 2021 · 2 comments
Open

Module does not support for_each due to hard coded providers #48

heathsnow opened this issue Jun 3, 2021 · 2 comments
Labels
bug 🐛 An issue with the system

Comments

@heathsnow
Copy link

heathsnow commented Jun 3, 2021

Describe the Bug

The module is unable to support for_each since it contains provider configuration:

Module "foo" cannot be used with for_each because it contains a
nested provider configuration for "aws.requester", at
.terraform/modules/foo/requester.tf:60,10-15.

Expected Behavior

The module should support for_each loops.

Additional Context

I believe passing the providers into the module (instead of configuring the providers w/in the module) would do the trick. I labeled this as bug but it may be a feature request instead.

@heathsnow heathsnow added the bug 🐛 An issue with the system label Jun 3, 2021
@dtrinf
Copy link

dtrinf commented Mar 17, 2022

Hi all, any update in this feature?

@nitrocode
Copy link
Member

nitrocode commented Jun 18, 2022

I think this would be a good extension to this module. Since this would be a breaking change, we'd require a migration doc, updated examples, and move to the next major version of 1.x. We would also try to close as many open issues as possible with prs for that release.

I'd like to work on this when I find the time. Feel free to contribute the change too and we will review.

@nitrocode nitrocode changed the title Module does not support for_each Module does not support for_each due to hard coded providers Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants