terraform-provider-github
terraform-provider-github copied to clipboard
[FEAT]: add support for pre-defined organization roles
Describe the need
As announced https://github.blog/changelog/2024-07-10-pre-defined-organization-roles-that-grant-access-to-all-repositories/ Github has added support for pre-defined organisation roles.
To add new resource like github_team_organization_role similar to github_team_repository to assign team to pre-defined role.
resource "github_team" "some_team" {
name = "SomeTeam"
description = "Some cool team"
}
resource "github_team_organization_role" "some_team_role" {
team_id = github_team.some_team.slug
role = "all_repo_read"
}
API:
- Assign an organization role to a team
- Get all organization roles for an organization
- Remove an organization role from a team
SDK Version
No response
API Version
No response
Relevant log output
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Workaround is to use REST API provider
resource "restapi_object" "global_permissions" {
for_each = var.global_permissions
path = "/orgs/${var.organization_name}/organization-roles"
object_id = local.global_permissions[each.value.permission]
create_path = "/orgs/${var.organization_name}/organization-roles/teams/${each.key}/{id}"
update_path = "/orgs/${var.organization_name}/organization-roles/teams/${each.key}/{id}"
destroy_path = "/orgs/${var.organization_name}/organization-roles/teams/${each.key}/{id}"
create_method = "PUT"
data = jsonencode({})
}
👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!
Not stale
Any update on this?
This issue is not stale. The suggested solution with mastercard/restapi is working, but the provider is not gpg signed.