-
Notifications
You must be signed in to change notification settings - Fork 1
/
teams.tf
38 lines (34 loc) · 1.08 KB
/
teams.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
resource "github_team" "teams" {
for_each = var.teams
name = each.value["name"]
description = each.value["description"]
privacy = each.value["privacy"]
}
# Admin Repositories
resource "github_team_repository" "admin-repositories" {
for_each = var.team_repo_access["admins"]
team_id = github_team.teams["admins"].id
repository = each.key
permission = each.value
}
# Bots Repositories
resource "github_team_repository" "bot-repositories" {
for_each = var.team_repo_access["bots"]
team_id = github_team.teams["bots"].id
repository = each.key
permission = each.value
}
# Helpers Repositories
resource "github_team_repository" "helper-repositories" {
for_each = var.team_repo_access["helpers"]
team_id = github_team.teams["helpers"].id
repository = each.key
permission = each.value
}
# Maintainers Repositories
resource "github_team_repository" "maintainer-repositories" {
for_each = var.team_repo_access["maintainers"]
team_id = github_team.teams["maintainers"].id
repository = each.key
permission = each.value
}