Open
Conversation
added 2 commits
March 12, 2026 00:38
alambike
reviewed
Mar 17, 2026
Comment on lines
+10
to
+18
| resource "github_team_membership" "relationships" { | ||
| for_each = { | ||
| for r in var.config.relationships : "${r.username}-${r.teamId}" => r | ||
| } | ||
|
|
||
| team_id = each.value.teamId # accepts slug directly | ||
| username = each.value.username | ||
| role = each.value.role | ||
| } |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Terraform module (modules/gh-membership) to manage GitHub organization membership and team membership relationships, and wires it into the repository’s release-please module release automation (Issue #975).
Changes:
- Introduces
modules/gh-membershipimplementinggithub_membership(org role) andgithub_team_membership(team relationships) driven by a singleconfigobject. - Adds module documentation scaffolding (terraform-docs config, header/footer docs) plus a basic example using JSON input.
- Registers the new module in
release-please-config.json.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| release-please-config.json | Adds release-please package entry for the new gh-membership module. |
| modules/gh-membership/versions.tf | Declares the GitHub provider requirement for the module. |
| modules/gh-membership/variables.tf | Defines the strongly-typed config input object and validations. |
| modules/gh-membership/main.tf | Creates org membership and team memberships from config. |
| modules/gh-membership/outputs.tf | Exposes organization membership and team relationship outputs. |
| modules/gh-membership/.terraform-docs.yml | Configures terraform-docs generation for the module README. |
| modules/gh-membership/docs/header.md | Provides README header content and usage examples. |
| modules/gh-membership/docs/footer.md | Provides README footer content (examples/resources/support). |
| modules/gh-membership/README.md | Generated module README (terraform-docs injection). |
| modules/gh-membership/_examples/basic/main.tf | Minimal example consuming config from JSON. |
| modules/gh-membership/_examples/basic/config.json | Example JSON input for the module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+2
to
+4
| ### 3. `docs/footer.md` | ||
| ```markdown | ||
| ## Examples |
Comment on lines
+22
to
+33
| ```hcl | ||
| module "membership" { | ||
| source = "git::https://github.com/prefapp/tfm.git//modules/gh-membership" | ||
|
|
||
| config = var.config | ||
| } | ||
|
|
||
| #### Inline example | ||
| ```hcl | ||
| module "membership" { | ||
| source = "git::https://github.com/prefapp/tfm.git//modules/gh-membership" | ||
|
|
Comment on lines
+5
to
+7
| username = string | ||
| teamId = string # team slug (e.g. "jvazquez-prefapp-all") | ||
| role = optional(string, "member") # member | maintainer |
| for r in var.config.relationships : "${r.username}-${r.teamId}" => r | ||
| } | ||
|
|
||
| team_id = each.value.teamId # accepts slug directly |
| @@ -151,5 +151,8 @@ | |||
| "modules/aws-secretsmanager-replication": { | |||
| "package-name": "aws-secretsmanager-replication" | |||
| } | |||
| @@ -151,5 +151,8 @@ | |||
| "modules/aws-secretsmanager-replication": { | |||
| "package-name": "aws-secretsmanager-replication" | |||
| } | |||
Comment on lines
+21
to
+30
| ```hcl | ||
| module "membership" { | ||
| source = "git::https://github.com/prefapp/tfm.git//modules/gh-membership" | ||
|
|
||
| config = var.config | ||
| } | ||
|
|
||
| #### Inline example | ||
| ```hcl | ||
| module "membership" { |
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 #975