Skip to content

[BUG]: Error: Invalid address to set: []string{"create_default_maintainer"} trying to import github_team_members #2124

Closed as not planned

Description

@richjyoung

Expected Behavior

Importing an existing team's members fails with an error. The team already exists and has been imported prior to this, with terraform plan showing no changes required. The existing team has members already added, and the github_team_members resource has been set up to match before import.

Actual Behavior

Running terraform import ... yields the following error:

> terraform import github_team_members.existing_team existing_team
github_team_members.existing_team: Importing from ID "existing_team"...
╷
│ Error: Invalid address to set: []string{"create_default_maintainer"}

Terraform Version

Terraform v1.7.1
on darwin_amd64

  • provider registry.terraform.io/integrations/github v6.0.0-beta

Affected Resource(s)

  • github_team_members

Terraform Configuration Files

resource "github_team" "existing_team" {
  name = "Existing Team"
  privacy = "closed"
  create_default_maintainer = false
}

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

  members {
    username = "an-existing-user"
    role     = "maintainer"
  }
  members {
    username = "another-existing-user"
    role     = "member"
  }
}

Steps to Reproduce

  1. Manually create a Team or use an existing one
  2. Import the team into terraform
  3. Manually add users to the Team
  4. Attempt to import team members using:
$ terraform import github_team_members.existing_team existing_team

Debug Output

No response

Panic Output

No response

Code of Conduct

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

Activity

  1. added
    Status: Triage
    Type: Bug
    on Jan 31, 2024
  2. added
    Status: Up for grabs
    and removed
    Status: Triage
    on Feb 2, 2024
  3. moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Activeon Feb 2, 2024
  4. github-actions commented on Oct 30, 2024

    @github-actions

    👋 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!

  5. added
    Status: Stale
    on Oct 30, 2024
  6. moved this from 🔥 Backlog to ✅ Done in 🧰 Octokit Activeon Nov 7, 2024
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

    Status: StaleStatus: Up for grabsType: Bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions