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
1 change: 1 addition & 0 deletions modules/team/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_parent_id"></a> [parent\_id](#input\_parent\_id) | The ID of the parent team if it exists (optional). | `string` | `""` | no |
| <a name="input_privacy"></a> [privacy](#input\_privacy) | The privacy setting for the github team. Must be one of `closed` or `secret`. | `string` | `"closed"` | no |
| <a name="input_team_description"></a> [team\_description](#input\_team\_description) | Description of the github team to be created. | `string` | `""` | no |
| <a name="input_team_id"></a> [team\_id](#input\_team\_id) | The ID of the team if it exists (optional). | `string` | `""` | no |
Expand Down
11 changes: 6 additions & 5 deletions modules/team/team.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ locals {
}

resource "github_team" "team" {
count = local.create_team ? 1 : 0
name = var.team_name
description = var.team_description
privacy = var.privacy
}
count = local.create_team ? 1 : 0
name = var.team_name
description = var.team_description
privacy = var.privacy
parent_team_id = var.parent_id
}
8 changes: 7 additions & 1 deletion modules/team/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ variable "team_id" {
type = string
description = "The ID of the team if it exists (optional)."
default = ""
}
}

variable "parent_id" {
type = string
description = "The ID of the parent team if it exists (optional)."
default = ""
}
4 changes: 2 additions & 2 deletions modules/team_set/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_preexisting_teams"></a> [preexisting\_teams](#input\_preexisting\_teams) | A map of existing teams where the key is the team name and the value is the configuration | <pre>map(object({<br> bucket = string<br> prefix = string<br> output_name = string<br> maintainers = list(string)<br> members = list(string)<br> }))</pre> | `{}` | no |
| <a name="input_teams"></a> [teams](#input\_teams) | A map of teams to create where the key is the team name and the value is the configuration | <pre>map(object({<br> description = string<br> privacy = string<br> maintainers = list(string)<br> members = list(string)<br> }))</pre> | n/a | yes |
| <a name="input_preexisting_teams"></a> [preexisting\_teams](#input\_preexisting\_teams) | A map of existing teams where the key is the team name and the value is the configuration. If the team does not have a parent team, the parent\_id should be an empty string. | <pre>map(object({<br> bucket = string<br> prefix = string<br> output_name = string<br> maintainers = list(string)<br> members = list(string)<br> parent_id = string<br> }))</pre> | `{}` | no |
| <a name="input_teams"></a> [teams](#input\_teams) | A map of teams to create where the key is the team name and the value is the configuration. If the team does not have a parent team, the parent\_id should be an empty string. | <pre>map(object({<br> description = string<br> privacy = string<br> maintainers = list(string)<br> members = list(string)<br> parent_id = string<br> }))</pre> | n/a | yes |

## Outputs

Expand Down
2 changes: 2 additions & 0 deletions modules/team_set/teams.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module "team" {
team_members = each.value.members
team_description = each.value.description
privacy = each.value.privacy
parent_id = each.value.parent_id
team_name = each.key
}

Expand All @@ -18,5 +19,6 @@ module "prexisting_team" {

team_maintainers = each.value.maintainers
team_members = each.value.members
parent_id = each.value.parent_id
team_name = each.key
}
6 changes: 4 additions & 2 deletions modules/team_set/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ variable "teams" {
privacy = string
maintainers = list(string)
members = list(string)
parent_id = string
}))
description = "A map of teams to create where the key is the team name and the value is the configuration"
description = "A map of teams to create where the key is the team name and the value is the configuration. If the team does not have a parent team, the parent_id should be an empty string."
}

variable "preexisting_teams" {
Expand All @@ -15,7 +16,8 @@ variable "preexisting_teams" {
output_name = string
maintainers = list(string)
members = list(string)
parent_id = string
}))
description = "A map of existing teams where the key is the team name and the value is the configuration"
description = "A map of existing teams where the key is the team name and the value is the configuration. If the team does not have a parent team, the parent_id should be an empty string."
default = {}
}