Skip to content

[BUG]: Importing GitHub EMU group mapping fails for more than 1 team #3030

Closed

Description

@jmaixl

Expected Behavior

Importing a EMU group mapping should require the group ID and team slug and should not fail if the group is connected to multiple teams.

Documentation reference:
https://registry.terraform.io/providers/integrations/github/latest/docs/resources/emu_group_mapping#group_id-1

Actual Behavior

Importing a EMU group mapping fails if the group is connected to multiple teams.

See error returned:

Terraform Version

Terraform v1.14.3
on linux_amd64
+provider registry.terraform.io/integrations/github v6.8.3

Affected Resource(s)

  • github_emu_group_mapping

Terraform Configuration Files

Steps to Reproduce

No response

Debug Output

Panic Output

Code of Conduct

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

Activity

  1. added
    Type: Bug
    Status: Triage
    on Dec 31, 2025
  2. github-actions commented on Dec 31, 2025

    @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! 🚀

  3. deiga commented on Dec 31, 2025

    @deiga
    Collaborator

    Hey @jmaixl,

    Could you post an example of what the resource definition would look like of the mapping you are trying to import?

  4. jmaixl commented on Dec 31, 2025

    @jmaixl
    Author

    Ideally the mapping is identified by both the group ID and the team slug:

    terraform import github_emu_group_mapping.example_emu_group_mapping 28836:my-team-slug
    
  5. deiga commented on Dec 31, 2025

    @deiga
    Collaborator

    @jmaixl Thanks! But I meant the code for resource "github_emu_group_mapping" "example_emu_group_mapping" { ... }

    AKA what structure are you trying to import it into. Otherwise I'm not sure I can reproduce what you are experiencing

  6. jmaixl commented on Dec 31, 2025

    @jmaixl
    Author
  7. deiga commented on Jan 5, 2026

    @deiga
    Collaborator

    @jmaixl I think I wasn't able to express myself clearly.
    Can you supply us with an example config snippet which describes how the terraform code should like if if you were to successfully import the mapping?

    I want to be able to reproduce the issue

  8. jmaixl commented on Jan 5, 2026

    @jmaixl
    Author

    First create two group mappings from the same group to 2 different teams (also known as creating a team using a group to populate its membership). This can be done in Terraform but also manually so you can import them afterward.

    resource "github_emu_group_mapping" "example_emu_group_mapping" {
      team_slug = "test-team-1" # The GitHub team name to modify
      group_id = 28836 # The group ID of the external group to link
    }
    resource "github_emu_group_mapping" "example_emu_group_mapping" {
      team_slug = "test-team-2" # The GitHub team name to modify
      group_id = 28836 # The group ID of the external group to link
    }
    

    Now, this import will fail:

    # terraform import github_emu_group_mapping.example_emu_group_mapping 28836
    
  9. deiga commented on Jan 5, 2026

    @deiga
    Collaborator

    Thank you! 🙏

    From this I gather that maybe we should change the import to use a combined import ID like <team-slug>:<group-id> . What do you think?

  10. jmaixl commented on Jan 5, 2026

    @jmaixl
    Author

    Yes, I think that's a good idea (and what I was thinking above

  11. added this to the v6.10.0 Release milestone on Jan 13, 2026
  12. removed
    Status: Triage
    on Jan 13, 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: Bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions