Closed
Description
Found a bug? Maybe our Slack Community can help.
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:
- Clone this repository
cd ./examples/complete
- Modify
main.tf
to replace boilerplate with actual group names and real AWS account ids terraform init
terraform plan
- 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