Skip to content

Commit 5cdd5b9

Browse files
committed
Use each.key when for_each is a set() (fix)
each.value is only available for accessing a value in a map() each.key must be used for a set()
1 parent 9bcf073 commit 5cdd5b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/github-team/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ resource "github_team" "team" {
2929
resource "github_team_membership" "maintainer" {
3030
for_each = var.maintainers
3131
team_id = github_team.team.id
32-
username = each.value
32+
username = each.key
3333
role = "maintainer"
3434
}
3535

@@ -40,6 +40,6 @@ resource "github_team_membership" "maintainer" {
4040
resource "github_team_membership" "member" {
4141
for_each = var.members
4242
team_id = github_team.team.id
43-
username = each.value
43+
username = each.key
4444
role = "member"
4545
}

0 commit comments

Comments
 (0)