Created
April 11, 2021 19:48
-
-
Save brunapereira/6d173cad00978b4a43fa613c5675e353 to your computer and use it in GitHub Desktop.
team main with membership
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "github_team" "engineers-team" { | |
name = "Engineers" | |
description = "organization engineers" | |
privacy = "closed" | |
} | |
resource "github_team" "admins-team" { | |
name = "Admins" | |
description = "organization admins" | |
privacy = "closed" | |
} | |
resource "github_team_membership" "engineer-members" { | |
for_each = var.engineer-members | |
username = each.value | |
team_id = github_team.engineers-team.id | |
role = "member" | |
} | |
resource "github_team_membership" "admin-maintainers-for-engineers-team" { | |
for_each = var.admin-members | |
username = each.value | |
team_id = github_team.engineers-team.id | |
role = "maintainer" | |
} | |
resource "github_team_membership" "admin-maintainers-for-admins-team" { | |
for_each = var.admin-members | |
username = each.value | |
team_id = github_team.admins-team.id | |
role = "maintainer" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment