Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
mkushakov opened this issue Jul 11, 2024 · 1 comment · May be fixed by #2322
Open
1 task done

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

mkushakov opened this issue Jul 11, 2024 · 1 comment · May be fixed by #2322
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request

Comments

@mkushakov
Copy link

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:

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mkushakov mkushakov added Status: Triage This is being looked at and prioritized Type: Feature New feature or request labels Jul 11, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Jul 15, 2024
@felixlut felixlut linked a pull request Jul 17, 2024 that will close this issue
4 tasks
@akmalharith
Copy link

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({})
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants