Created
March 17, 2023 09:54
-
-
Save OldCrowEW/8c99fd406144ff55e9aeb8c11ceb3347 to your computer and use it in GitHub Desktop.
This file contains hidden or 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_repository" "tf_test" { | |
for_each = local.repo_tf_test.permission | |
repository = github_repository.tf_test_repo.name | |
team_id = each.key | |
permission = each.value | |
} |
This file contains hidden or 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
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