Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,14 @@ Use a template repository to create this resource.
See [Template Object Attributes](#template-object-attributes) below for details.

##### Teams Configuration
Teams need to exist beforehand. Your can use non-computed
Your can use non-computed
(known at `terraform plan`) team names or slugs
(`*_teams` Attributes; **recommended**)
(`*_teams` Attributes)
or computed (only known in `terraform apply` phase) team IDs
(`*_team_ids` Attributes).
When using non-computed names/slugs make sure to add the actual team resources as
indirect dependencies in `module_depends_on` as explained in
[Module Configuration](#module-configuration) above.
**When using non-computed names/slugs teams need to exist before running plan.**
This is due to some terraform limitation and we will update the module once terraform
removed thislimitation.

- **`pull_teams`** or **`pull_team_ids`**: *(Optional `list(string)`)*
A list of teams to grant pull (read-only) permission.
Expand Down
4 changes: 2 additions & 2 deletions examples/private-repository-with-team/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ module "repository" {
archived = false
topics = ["terraform", "integration-test"]

admin_teams = [
var.team_name
admin_team_ids = [
github_team.team.id
]

branch_protections = [
Expand Down
4 changes: 2 additions & 2 deletions examples/public-repository-complete-example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ module "repository" {
archived = false
topics = var.topics

admin_teams = [
var.team_name
admin_team_ids = [
github_team.team.id
]

branch_protections = [
Expand Down
5 changes: 0 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,6 @@ data "github_team" "teams" {
for_each = local.teams

slug = each.value.slug

depends_on = [
var.module_depends_on,
github_repository.repository,
]
}

resource "github_team_repository" "team_repository_by_slug" {
Expand Down