github_team_sync_group_mapping

This resource allows you to create and manage Identity Provider (IdP) group connections within your GitHub teams. You must have team synchronization enabled for organizations owned by enterprise accounts.

To learn more about team synchronization between IdPs and GitHub, please refer to: https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/synchronizing-teams-between-your-identity-provider-and-github

Example Usage

data "github_organization_team_sync_groups" "example_groups" {}

resource "github_team_sync_group_mapping" "example_group_mapping" {
  team_slug        = "example"

  dynamic "group" {
    for_each = [for g in data.github_organization_team_sync_groups.example_groups.groups : g if g.group_name == "some_team_group"]
    content {
      group_id          = group.value.group_id
      group_name        = group.value.group_name
      group_description = group.value.group_description
    }
  }
}

Argument Reference

The following arguments are supported:


The group block consists of:

Import

GitHub Team Sync Group Mappings can be imported using the GitHub team slug e.g.

$ terraform import github_team_sync_group_mapping.example some_team