Skip to content

Commit 7507818

Browse files
authored
Merge pull request #37 from mineiros-io/revert-36-mariux/fix-dependency-in-team-by-name
Revert "Fix dependency issue when assigning teams by name"
2 parents 8f4299b + 6754f97 commit 7507818

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,14 @@ Use a template repository to create this resource.
189189
See [Template Object Attributes](#template-object-attributes) below for details.
190190

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

201201
- **`pull_teams`** or **`pull_team_ids`**: *(Optional `list(string)`)*
202202
A list of teams to grant pull (read-only) permission.

examples/private-repository-with-team/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ module "repository" {
3636
archived = false
3737
topics = ["terraform", "integration-test"]
3838

39-
admin_teams = [
40-
var.team_name
39+
admin_team_ids = [
40+
github_team.team.id
4141
]
4242

4343
branch_protections = [

examples/public-repository-complete-example/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ module "repository" {
6060
archived = false
6161
topics = var.topics
6262

63-
admin_teams = [
64-
var.team_name
63+
admin_team_ids = [
64+
github_team.team.id
6565
]
6666

6767
branch_protections = [

main.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,6 @@ data "github_team" "teams" {
331331
for_each = local.teams
332332

333333
slug = each.value.slug
334-
335-
depends_on = [
336-
var.module_depends_on,
337-
github_repository.repository,
338-
]
339334
}
340335

341336
resource "github_team_repository" "team_repository_by_slug" {

0 commit comments

Comments
 (0)