Skip to content

Add support for creating teams with explicit maintainers #3135

Open

Description

@mymasse

Originally posted by @mymasse in #3115

Add deterministic support for create_with_maintainers = [] to github_team so teams can be created and managed by non-privileged users.

The create_default_maintainer deprecation breaks creation of teams when Terraform is run by a non-privileged user. When running terraform with maintainer_username user, a regular user with a PAT with the required permissions (non org-admin). The following will fail:

resource "github_team" "test" {
  name                      = "Test"
  parent_team_id      = github_team.parent.id
  privacy                   = "closed"
}

resource "github_team_members" "test" {
  team_id = github_team.test.id

  members {
    username = "maintainer_username"
    role     = "maintainer"
  }
  members {
    username = "mymasse"
  }
}
github_team.test: Creating...
github_team.test: Creation complete after 3s [id=15957916]
github_team_members.test: Creating...
╷
│ Error: PUT https://api.github.com/organizations/17620943/team/15957916/memberships/trecnoc-terraform: 403 You must be an organization owner or team maintainer to add a team membership. []
│ 
│   with github_team_members.test,
│   on main.tf line 359, in resource "github_team_members" "test":
│  359: resource "github_team_members" "test" {
│ 
╵

Activity

  1. github-actions commented on Jan 27, 2026

    @github-actions

    👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

  2. added
    Type: Feature
    Status: Up for grabs
    on Jan 27, 2026
  3. added this to the v6.11.0 Release milestone on Jan 27, 2026
  4. changed the title [-]`create_default_maintainer` deprecation breaks creation of teams when terraform is run by a non-privileged user[/-] [+]Add support for creating teams with explicit maintainers[/+] on Jan 27, 2026
  5. removed this from the v6.12.0 Release milestone on Mar 31, 2026
  6. removed
    Status: Up for grabs
    on May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions