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

Can't reference module output in aws_iam_user count #4007

Closed
phoolish opened this issue Nov 21, 2015 · 2 comments
Closed

Can't reference module output in aws_iam_user count #4007

phoolish opened this issue Nov 21, 2015 · 2 comments

Comments

@phoolish
Copy link
Contributor

module "vars" {
  source = "../variables"
}

resource "aws_iam_user" "mod" {
  count = "${length(split(",", module.vars.members))}"
  name = "${element(split(",", module.vars.members), count.index)}"
}

Returns:

Errors:

  * 1 error(s) occurred:

* module members.root: 1 error(s) occurred:

* aws_iam_user.mod: resource count can't reference module variable: module.vars.members

If I set the count or use a local variable, it works without a problem.

Terraform v0.6.6

Thanks!

@phoolish
Copy link
Contributor Author

Duplicates #1497

@ghost
Copy link

ghost commented Apr 29, 2020

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 Apr 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant