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 be determined for_each in rules variable of alb-listener module #53

Open
posquit0 opened this issue Feb 25, 2022 · 0 comments
Open

Comments

@posquit0
Copy link
Member

 > tf apply
╷
│ Error: Invalid for_each argument
│
│   on ../../modules/alb-listener/main.tf line 148, in resource "aws_lb_listener_rule" "this":
│  148:   for_each = {
│  149:     for rule in var.rules :
│  150:     rule.priority => rule
│  151:   }
│     ├────────────────
│     │ var.rules 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant