Open
Conversation
Open
…into feat/952-poc-gh-group
jotasixto
reviewed
Mar 2, 2026
alambike
reviewed
Mar 17, 2026
Comment on lines
+10
to
+18
| resource "github_team_membership" "members" { | ||
| for_each = { | ||
| for m in var.config.group_members : m.username => m | ||
| } | ||
|
|
||
| team_id = github_team.this.id | ||
| username = each.value.username | ||
| role = "member" | ||
| } |
Contributor
There was a problem hiding this comment.
The github_membership has also this feature to include an user in a set of teams. Which of the two do we use/need? 🤔
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Terraform module (modules/gh-team) intended as a proof-of-concept for managing GitHub teams and team memberships, and wires it into the repo’s release-please configuration (per issue #952).
Changes:
- Register
modules/gh-teaminrelease-please-config.json. - Add
modules/gh-teamTerraform module (resources, variables, outputs), docs, changelog, and a basic example. - Remove the repository root
README.md.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| release-please-config.json | Adds the new module to release-please package configuration. |
| modules/gh-team/versions.tf | Declares GitHub provider requirement for the new module. |
| modules/gh-team/variables.tf | Defines a single config object input with validations. |
| modules/gh-team/main.tf | Creates the GitHub team and assigns memberships. |
| modules/gh-team/outputs.tf | Exposes created team attributes and member list. |
| modules/gh-team/docs/header.md | Module documentation header content used by terraform-docs. |
| modules/gh-team/docs/footer.md | Module documentation footer content used by terraform-docs. |
| modules/gh-team/README.md | Generated module README (terraform-docs injected). |
| modules/gh-team/_examples/basic/main.tf | Minimal example for consuming the module. |
| modules/gh-team/_examples/basic/config.json | Example JSON config for the module. |
| modules/gh-team/CHANGELOG.md | Initial changelog entry for the module. |
| modules/gh-team/.terraform-docs.yml | terraform-docs configuration for README generation. |
| README.md | Deletes the repository root README. |
Comments suppressed due to low confidence (1)
README.md:1
- This PR deletes the repository root
README.md. If this is unintentional, please restore it (it currently documents the repo’s release-please workflow). If it is intentional, consider replacing it with an updated root README rather than removing it entirely.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## Overview | ||
|
|
||
| This module provisions a single GitHub Team and automatically manages its members using a single strongly-typed `config` object. | ||
| It supports nested teams (`parentTeamId`), privacy settings (`closed`/`secret`), and full membership roles while keeping the external interface minimal and JSON-friendly. |
Comment on lines
+153
to
+155
| }, | ||
| "modules/gh-team": { | ||
| "package-name": "gh-team" |
Comment on lines
+1
to
+8
| terraform { | ||
| required_providers { | ||
| github = { | ||
| source = "integrations/github" | ||
| version = "~> 6.0" | ||
| } | ||
| } | ||
| } |
|
|
||
| team_id = github_team.this.id | ||
| username = each.value.username | ||
| role = "member" |
Comment on lines
+23
to
+28
| ```hcl | ||
| module "my_team" { | ||
| source = "git::https://github.com/prefapp/tfm.git//modules/github-team" | ||
|
|
||
| config = jsondecode(file("${path.root}/team-config.json")) | ||
| } |
Comment on lines
+1
to
+8
| terraform { | ||
| required_providers { | ||
| github = { | ||
| source = "integrations/github" | ||
| version = "~> 6.0" | ||
| } | ||
| } | ||
| } |
|
|
||
| ```hcl | ||
| module "my_team" { | ||
| source = "git::https://github.com/prefapp/tfm.git//modules/github-team" |
Comment on lines
+73
to
+90
| ### 3. `docs/footer.md` | ||
| ```markdown | ||
| ## Examples | ||
|
|
||
| For detailed examples, refer to the [module examples](https://github.com/prefapp/tfm/tree/main/modules/github-team/_examples): | ||
|
|
||
| - [basic](https://github.com/prefapp/tfm/tree/main/modules/github-team/_examples/basic) - Minimal team creation with JSON input | ||
|
|
||
| ## Resources | ||
|
|
||
| - **github_team**: [Official Documentation](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team) | ||
| - **github_team_membership**: [Official Documentation](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_membership) | ||
| - **GitHub Terraform Provider**: [Official Documentation](https://registry.terraform.io/providers/integrations/github/latest/docs) | ||
|
|
||
| ## Support | ||
|
|
||
| For issues, questions, or contributions related to this module, please visit the [repository's issue tracker](https://github.com/prefapp/tfm/issues). | ||
| ``` |
Comment on lines
+2
to
+10
| ### 3. `docs/footer.md` | ||
| ```markdown | ||
| ## Examples | ||
|
|
||
| For detailed examples, refer to the [module examples](https://github.com/prefapp/tfm/tree/main/modules/github-team/_examples): | ||
|
|
||
| - [basic](https://github.com/prefapp/tfm/tree/main/modules/github-team/_examples/basic) - Minimal team creation with JSON input | ||
|
|
||
| ## Resources |
| module "example_team" { | ||
| source = "../../" # points to the module root | ||
|
|
||
| config = jsondecode(file("${path.module}/team-config.json")) |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
solves #952