Skip to content

Conversation

@felixlut
Copy link
Contributor

@felixlut felixlut commented Jul 17, 2024

Resolves #2314


Before the change?

  • It was not possible to assign an organization role to a team with the Terraform provider

After the change?

  • Implemented a github_team_organization_role_assignment resource which is used to assign an organization role to a team

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No, this is a brand new resource


randomID := acctest.RandStringFromCharSet(5, acctest.CharSetAlphaNum)

// Using the predefined roles since custom roles are a strictly Enterprise feature ((https://github.blog/changelog/2024-07-10-pre-defined-organization-roles-that-grant-access-to-all-repositories/))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since custom organization roles are a Enterprise level feature, I have elected to not use them in the tests and instead use the built-in roles instead. I've created a manual mapping for their role_id:s here. Not ideal, but I don't have a better way of testing this

@ChristopherMank
Copy link

Looking forward to this feature! Any thoughts on when it might be implemented?

@felixlut
Copy link
Contributor Author

felixlut commented Nov 14, 2024

@ChristopherMank sometime after #2443 is merged probably. The bump of the SDK will include google/go-github#3281, which makes it possible to use the google/go-github sdk entirely for this PR instead of the octokit/go-sdk. I want to avoid using it because of the reason mentioned here. There are some minor changes required to this PR after that as well, but not difficult at all to do.

@garettmd
Copy link

@felixlut any chance we could merge this? Looks like the #2443 was merged back in October, so hopefully there aren't any more blockers on this feature.

@felixlut
Copy link
Contributor Author

@garettmd I'm not actively working on this. I think the latest update regarding Organization Roles support can be found in #2487.

TLDR is that there are open PR:s for solving the issue, but we are lacking maintainer support for getting them over the line. The 2 latest updates to this repo (#2615, #2665) might offer some more context on that topic.

@nickfloyd nickfloyd moved this to On Deck in Terraform Provider Oct 14, 2025
@nickfloyd nickfloyd moved this from On Deck to In Progress in Terraform Provider Oct 20, 2025
@nickfloyd
Copy link
Contributor

Fast follow: #2787

@nickfloyd nickfloyd merged commit af6f192 into integrations:main Oct 20, 2025
2 of 3 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Terraform Provider Oct 20, 2025
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in 🧰 Octokit Active Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

[FEAT]: add support for pre-defined organization roles

4 participants