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 for_each #22606

Closed
bentterp opened this issue Aug 27, 2019 · 3 comments
Closed

module for_each #22606

bentterp opened this issue Aug 27, 2019 · 3 comments

Comments

@bentterp
Copy link

Current Terraform Version

0.12.7

Use-cases

In the same manner as we can now use for_each to create multiple resources based on a map of values, it would be great if we could also do it for modules themselves - not just resources in modules.

Attempted Solutions

Proposal

variable "names" {
  type = set(string)
  default = [ "peter", "paul" ]
}
module "foreach" {
  source = "../modules/mymod"
  for_each = var.names
  name = each.key
}

References

@rrijkse
Copy link

rrijkse commented Aug 27, 2019

Duplicate of #17519

@mildwonkey
Copy link
Contributor

I am going to close this in favor of #17519 - thanks!

@ghost
Copy link

ghost commented Sep 27, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Sep 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants