Skip to content

[BUG]: v6.13.0 lower cases all team members #3533

Closed

Description

@gaima8

Expected Behavior

Usernames shouldn't be lowercased, of if they are lowercased consistently lowercased.
v6.13.0 brought in some lowercasing on team members, v6.12.1 was good.

Actual Behavior

  # github_team_members.misc_devs has changed
  ~ resource "github_team_members" "misc_devs" {
        id        = "123456"
        # (2 unchanged attributes hidden)

      - members {
          - role     = "member" -> null
          - username = "ChrisSomethingSomething" -> null
        }
      + members {
          + role     = "member"
          + username = "chrissomethingsomething"
        }

        # (6 unchanged blocks hidden)
    }
  # github_team_members.misc_devs will be updated in-place
  ~ resource "github_team_members" "misc_devs" {
        id        = "123456"
        # (2 unchanged attributes hidden)

      - members {
          - role     = "member" -> null
          - username = "chrissomethingsomething" -> null
        }
      + members {
          + role     = "member"
          + username = "ChrisSomethingSomething"
        }

        # (6 unchanged blocks hidden)
    }

Terraform Version

OpenTofu v1.12.0
on linux_amd64

  • provider registry.opentofu.org/integrations/github v6.13.0

GitHub Installation Type

  • GitHub.com (Free, Pro, or Team)
  • GitHub Enterprise Server (on-premises)
  • GitHub Enterprise Cloud with Personal Accounts (github.com)
  • GitHub Enterprise Cloud with Managed Users/EMU (github.com)
  • GitHub Enterprise Cloud with Data Residency (*.ghe.com)
  • I don't know

Affected Resource(s)

  • github_team_members

Terraform Configuration Files

Steps to Reproduce

No response

Debug Output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    Type: Bug
    Status: Triage
    on Jul 10, 2026
  2. github-actions commented on Jul 10, 2026

    @github-actions

    👋 Hi, and thank you for opening this issue!

    This repo is maintained by GitHub and community members on a best-effort basis. We'll get to this as soon as we can.

    You can help us prioritize by adding details, reproduction steps, or a 👍 to issues that matter to you, and by joining the discussion on open issues and PRs.


    🤖 This is an automated message.

  3. dncrews commented on Jul 10, 2026

    @dncrews

    +1: This bug creates a permadiff. We have one user who suddenly gets 4-6 emails every time we do a terraform apply because they are removed and then added right back to multiple groups due to this bug.

  4. reececomo commented on Jul 14, 2026

    @reececomo

    Same issue. Unable to revert due to:

    Error: Resource instance managed by newer provider version
    

    Any ETA on a fix forward?

  5. cattruscott commented on Jul 14, 2026

    @cattruscott

    It appears that this section replaced the previous teamMembersAndMaintainers and changed from member.Node.Login to strings.ToLower(edge.Node.Login)

  6. added this to the v6.14.0 milestone on Jul 14, 2026
  7. stevehipwell commented on Jul 14, 2026

    @stevehipwell
    Collaborator

    It looks like we need to add diff suppression to ignore case changes, internally the provider needs to use a consistent case.

  8. self-assigned this
    on Jul 14, 2026
  9. removed
    Status: Triage
    on Jul 14, 2026
  10. bootswithdefer commented on Jul 15, 2026

    @bootswithdefer

    Adding a lower() like username = lower("MixedCaseUsername") works around this issue for me. If the provider is going to lowercase usernames from github it also needs to lowercase usernames provided by the user.

  11. esacteksab commented on Jul 15, 2026

    @esacteksab

    Adding a lower() like username = lower("MixedCaseUsername") works around this issue for me. If the provider is going to lowercase usernames from github it also needs to lowercase usernames provided by the user.

    lower() didn't work for me. And having already ran with 6.13, I can't easily downgrade.

  12. added theissue type on Jul 22, 2026
  13. added
    vNextPatch
    on Jul 22, 2026
  14. modified the milestones: v6.14.0, v6.13.1 on Jul 22, 2026
  15. liskl commented on Jul 27, 2026

    @liskl

    Confirming on 6.13.0, and two data points that may help.

    1. The read path is the only thing affected; data sources are fine.

    I checked the same team three ways: 6.12.1, 6.13.0, and 6.13.0 again. In all three, the github_team data source returns the canonical mixed-case login. It is only the github_team_members resource read that lowercases, which matches @cattruscott's pointer to getTeamMembers. So the underlying API response is fine and the normalisation is purely provider-side.

    2. Applying is a no-op against the API, which is why it never converges.

    updateTeamMembers lowercases the configured login before calling AddTeamMembershipBySlug, so an apply does not actually change anything at GitHub. But the read writes lowercase into state while the config keeps canonical casing, so the diff reappears on the very next plan. In our case that is multiple dozens of github_team_members resources across three root modules, all cosmetic, on every single plan.

    3. On the "can't downgrade" reports from @reececomo and @esacteksab, plus a mitigation.

    6.13.0 bumps github_team_members SchemaVersion to 1 and ships a StateUpgrader, which is consistent with Resource instance managed by newer provider version after the fact.

    Worth flagging for anyone who has not upgraded yet: terraform plan does not persist the upgraded state, only apply does. We planned 6.13.0 across all our workspaces, saw the diff, and pinned straight back to 6.12.1 with no state surgery. If you are evaluating the upgrade, plan first and read the diff before applying, and you keep the ability to go back.

    Happy to test a patch against a reasonably large team set if that is useful.

  16. modified the milestones: v6.13.1, v6.14.0 on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type: Bugr/team_membersvNextPatch

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions