Skip to content

Instantly share code, notes, and snippets.

@OldCrowEW
Created March 17, 2023 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OldCrowEW/8c99fd406144ff55e9aeb8c11ceb3347 to your computer and use it in GitHub Desktop.
Save OldCrowEW/8c99fd406144ff55e9aeb8c11ceb3347 to your computer and use it in GitHub Desktop.
resource "github_team_repository" "tf_test" {
for_each = local.repo_tf_test.permission
repository = github_repository.tf_test_repo.name
team_id = each.key
permission = each.value
}
locals {
repo_tf_test = {
permission = {
(github_team.tf_test_team[0].id) = "pull"
(github_team.tf_test_team[3].id) = "push"
(github_team.tf_test_team[4].id) = "admin"
(github_team.tf_test_team[8].id) = "triage"
}
}
}
locals {
repo_perms = {
repo_tf_test = {
permissions = {
(github_team.tf_test_team[0].id) = "pull"
(github_team.tf_test_team[3].id) = "push"
(github_team.tf_test_team[4].id) = "admin"
(github_team.tf_test_team[8].id) = "triage"
}
},
repo_tf_test2 = {
permissions = {
(github_team.tf_test_team[1].id) = "pull"
(github_team.tf_test_team[2].id) = "push"
(github_team.tf_test_team[4].id) = "admin"
(github_team.tf_test_team[6].id) = "triage"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment