-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmins.tf
34 lines (27 loc) · 895 Bytes
/
admins.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
# Someone Elses Organisation Admins
locals {
admins = [
"Adebayo-S" #github username
]
}
# Add codeowners team as orgnisation member
resource "github_membership" "admins" {
for_each = toset(local.admins)
username = each.key
role = "admin"
}
data "github_repository" "manage_github" {
full_name = format("%s/%s",var.github_org, var.manage_repo)
}
# Set permissions to manage-github for contributors github team
# resource "github_team_repository" "manage_github_contributors" {
# team_id = github_team.contributors.id
# repository = data.github_repository.manage_github.name
# permission = "push"
# }
# # Set permissions to manage-github for codeowners github team
# resource "github_team_repository" "manage_github_codeowners" {
# team_id = github_team.codeowners.id
# repository = data.github_repository.manage_github.name
# permission = "push"
# }