When trying to add a new team to the org by adding it to the CSV file I am getting the following error:
│ Error: Invalid for_each argument
│
│ on teams.tf line 15, in resource "github_team_membership" "members":
│ 15: for_each = { for tm in local.team_members : tm.name => tm }
│ ├────────────────
│ │ local.team_members 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.
I get the error with or without the respective team csv file existing in the team-members folder.
If I add the team via the gui first and then import the team I'm able to get the plan and apply to work.