Skip to content

Instantly share code, notes, and snippets.

@anthosz
Created May 12, 2020 11:17
Show Gist options
  • Save anthosz/b12790d5bb49573fcb858fc07d5998b5 to your computer and use it in GitHub Desktop.
Save anthosz/b12790d5bb49573fcb858fc07d5998b5 to your computer and use it in GitHub Desktop.
terraform-github.tf
provider "github" {
token = "XXXXXXXXXX"
organization = "vthtest"
}
resource "github_team" "team1" {
name = "team1"
description = "Some cool team"
privacy = "closed"
}
resource "github_repository" "rep1" {
name = "rep1"
description = "Some cool repository"
}
resource "github_team_repository" "team1_rep1" {
team_id = github_team.team1.id
repository = github_repository.rep1.name
permission = "pull"
}
resource "github_team" "team2" {
name = "team2"
description = "Some cool team"
privacy = "closed"
}
resource "github_repository" "rep2" {
name = "rep2"
description = "Some cool repository"
}
resource "github_team_repository" "team2_rep2" {
team_id = github_team.team2.id
repository = github_repository.rep2.name
permission = "pull"
}
resource "github_team" "team3" {
name = "team3"
description = "Some cool team"
privacy = "closed"
}
resource "github_repository" "rep3" {
name = "rep3"
description = "Some cool repository"
}
resource "github_team_repository" "team3_rep3" {
team_id = github_team.team3.id
repository = github_repository.rep3.name
permission = "pull"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment