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

Cannot use a tuple value in for_each. An iterable collection is required. #28384

Closed
cilindrox opened this issue Apr 15, 2021 · 2 comments
Closed
Labels
bug new new issue not yet triaged

Comments

@cilindrox
Copy link

cilindrox commented Apr 15, 2021

Upgrading from terraform 0.14.10 to 0.15.0 - plan is now raising a bunch of errors for dynamic blocks using for_each loops:

locals {
  admin_users = ["foo", "bar"]
}

  dynamic "iam_identity_mapping" {
    for_each = [for a in local.admin_users : {
      iamarn   = "arn:aws:iam::123456:user/${a}"
      username = a
      groups = [
        "baz",
        "quux",
      ]
    }]
  }

on tf 0.15 the block above fails with Cannot use a tuple value in for_each. An iterable collection is required.

I'm somewhat lost, since I didn't see any specific references to this on the release notes or migration steps, could this be related to the provider implementation?

@cilindrox cilindrox added bug new new issue not yet triaged labels Apr 15, 2021
@cilindrox
Copy link
Author

Closing this - narrowed it down to a value this depended on being flagged as sensitive: hashicorp/terraform-provider-aws#9090 (comment)

Seems the aws_ssm_parameter resource applies the sensitive to every data source.

@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug new new issue not yet triaged
Projects
None yet
Development

No branches or pull requests

1 participant