Skip to content

Complete example not working #12

Closed
@nicolaevladescu

Description

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

│ Error: Invalid for_each argument
│
│   on .terraform/modules/assignments/modules/account-assignments/main.tf line 30, in resource "aws_ssoadmin_account_assignment" "this":
│   30:   for_each = local.assignment_map
│     ├────────────────
│     │ local.assignment_map will be known only after apply
│
│ The "for_each" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict how many instances will be created. To work around this, use the -target argument to
│ first apply only the resources that the for_each depends on.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Clone this repository
  2. cd ./examples/complete
  3. Modify main.tf to replace boilerplate with actual group names and real AWS account ids
  4. terraform init
  5. terraform plan
  6. See error

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

  • OS: Debian 10 on WSL
  • Terraform version: 0.15.1

Metadata

Assignees

No one assigned

    Labels

    bug🐛 An issue with the system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions