1. Packages
  2. GitHub
  3. API Docs
  4. TeamSyncGroupMapping
GitHub v6.3.0 published on Monday, Sep 16, 2024 by Pulumi

github.TeamSyncGroupMapping

Explore with Pulumi AI

github logo
GitHub v6.3.0 published on Monday, Sep 16, 2024 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const exampleGroups = github.getOrganizationTeamSyncGroups({});
    const exampleGroupMapping = new github.TeamSyncGroupMapping("example_group_mapping", {
        groups: .map(entry => ({
            groupId: entry.value.groupId,
            groupName: entry.value.groupName,
            groupDescription: entry.value.groupDescription,
        })),
        teamSlug: "example",
    });
    
    import pulumi
    import pulumi_github as github
    
    example_groups = github.get_organization_team_sync_groups()
    example_group_mapping = github.TeamSyncGroupMapping("example_group_mapping",
        groups=[{
            "group_id": entry["value"],
            "group_name": entry["value"],
            "group_description": entry["value"],
        } for entry in [{"key": k, "value": v} for k, v in [g for g in example_groups.groups if g.group_name == "some_team_group"]]],
        team_slug="example")
    
    Coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleGroups = Github.GetOrganizationTeamSyncGroups.Invoke();
    
        var exampleGroupMapping = new Github.TeamSyncGroupMapping("example_group_mapping", new()
        {
            Groups = ,
            TeamSlug = "example",
        });
    
    });
    
    Coming soon!
    
    Coming soon!
    

    Create TeamSyncGroupMapping Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TeamSyncGroupMapping(name: string, args: TeamSyncGroupMappingArgs, opts?: CustomResourceOptions);
    @overload
    def TeamSyncGroupMapping(resource_name: str,
                             args: TeamSyncGroupMappingArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def TeamSyncGroupMapping(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             team_slug: Optional[str] = None,
                             groups: Optional[Sequence[TeamSyncGroupMappingGroupArgs]] = None)
    func NewTeamSyncGroupMapping(ctx *Context, name string, args TeamSyncGroupMappingArgs, opts ...ResourceOption) (*TeamSyncGroupMapping, error)
    public TeamSyncGroupMapping(string name, TeamSyncGroupMappingArgs args, CustomResourceOptions? opts = null)
    public TeamSyncGroupMapping(String name, TeamSyncGroupMappingArgs args)
    public TeamSyncGroupMapping(String name, TeamSyncGroupMappingArgs args, CustomResourceOptions options)
    
    type: github:TeamSyncGroupMapping
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TeamSyncGroupMappingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args TeamSyncGroupMappingArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args TeamSyncGroupMappingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TeamSyncGroupMappingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TeamSyncGroupMappingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var teamSyncGroupMappingResource = new Github.TeamSyncGroupMapping("teamSyncGroupMappingResource", new()
    {
        TeamSlug = "string",
        Groups = new[]
        {
            new Github.Inputs.TeamSyncGroupMappingGroupArgs
            {
                GroupDescription = "string",
                GroupId = "string",
                GroupName = "string",
            },
        },
    });
    
    example, err := github.NewTeamSyncGroupMapping(ctx, "teamSyncGroupMappingResource", &github.TeamSyncGroupMappingArgs{
    	TeamSlug: pulumi.String("string"),
    	Groups: github.TeamSyncGroupMappingGroupArray{
    		&github.TeamSyncGroupMappingGroupArgs{
    			GroupDescription: pulumi.String("string"),
    			GroupId:          pulumi.String("string"),
    			GroupName:        pulumi.String("string"),
    		},
    	},
    })
    
    var teamSyncGroupMappingResource = new TeamSyncGroupMapping("teamSyncGroupMappingResource", TeamSyncGroupMappingArgs.builder()
        .teamSlug("string")
        .groups(TeamSyncGroupMappingGroupArgs.builder()
            .groupDescription("string")
            .groupId("string")
            .groupName("string")
            .build())
        .build());
    
    team_sync_group_mapping_resource = github.TeamSyncGroupMapping("teamSyncGroupMappingResource",
        team_slug="string",
        groups=[github.TeamSyncGroupMappingGroupArgs(
            group_description="string",
            group_id="string",
            group_name="string",
        )])
    
    const teamSyncGroupMappingResource = new github.TeamSyncGroupMapping("teamSyncGroupMappingResource", {
        teamSlug: "string",
        groups: [{
            groupDescription: "string",
            groupId: "string",
            groupName: "string",
        }],
    });
    
    type: github:TeamSyncGroupMapping
    properties:
        groups:
            - groupDescription: string
              groupId: string
              groupName: string
        teamSlug: string
    

    TeamSyncGroupMapping Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The TeamSyncGroupMapping resource accepts the following input properties:

    TeamSlug string
    Slug of the team
    Groups List<TeamSyncGroupMappingGroup>

    An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below.


    The group block consists of:

    TeamSlug string
    Slug of the team
    Groups []TeamSyncGroupMappingGroupArgs

    An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below.


    The group block consists of:

    teamSlug String
    Slug of the team
    groups List<TeamSyncGroupMappingGroup>

    An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below.


    The group block consists of:

    teamSlug string
    Slug of the team
    groups TeamSyncGroupMappingGroup[]

    An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below.


    The group block consists of:

    team_slug str
    Slug of the team
    groups Sequence[TeamSyncGroupMappingGroupArgs]

    An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below.


    The group block consists of:

    teamSlug String
    Slug of the team
    groups List<Property Map>

    An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below.


    The group block consists of:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TeamSyncGroupMapping resource produces the following output properties:

    Etag string
    Id string
    The provider-assigned unique ID for this managed resource.
    Etag string
    Id string
    The provider-assigned unique ID for this managed resource.
    etag String
    id String
    The provider-assigned unique ID for this managed resource.
    etag string
    id string
    The provider-assigned unique ID for this managed resource.
    etag str
    id str
    The provider-assigned unique ID for this managed resource.
    etag String
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing TeamSyncGroupMapping Resource

    Get an existing TeamSyncGroupMapping resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: TeamSyncGroupMappingState, opts?: CustomResourceOptions): TeamSyncGroupMapping
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            etag: Optional[str] = None,
            groups: Optional[Sequence[TeamSyncGroupMappingGroupArgs]] = None,
            team_slug: Optional[str] = None) -> TeamSyncGroupMapping
    func GetTeamSyncGroupMapping(ctx *Context, name string, id IDInput, state *TeamSyncGroupMappingState, opts ...ResourceOption) (*TeamSyncGroupMapping, error)
    public static TeamSyncGroupMapping Get(string name, Input<string> id, TeamSyncGroupMappingState? state, CustomResourceOptions? opts = null)
    public static TeamSyncGroupMapping get(String name, Output<String> id, TeamSyncGroupMappingState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Etag string
    Groups List<TeamSyncGroupMappingGroup>

    An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below.


    The group block consists of:

    TeamSlug string
    Slug of the team
    Etag string
    Groups []TeamSyncGroupMappingGroupArgs

    An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below.


    The group block consists of:

    TeamSlug string
    Slug of the team
    etag String
    groups List<TeamSyncGroupMappingGroup>

    An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below.


    The group block consists of:

    teamSlug String
    Slug of the team
    etag string
    groups TeamSyncGroupMappingGroup[]

    An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below.


    The group block consists of:

    teamSlug string
    Slug of the team
    etag str
    groups Sequence[TeamSyncGroupMappingGroupArgs]

    An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below.


    The group block consists of:

    team_slug str
    Slug of the team
    etag String
    groups List<Property Map>

    An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below.


    The group block consists of:

    teamSlug String
    Slug of the team

    Supporting Types

    TeamSyncGroupMappingGroup, TeamSyncGroupMappingGroupArgs

    GroupDescription string
    The description of the IdP group.
    GroupId string
    The ID of the IdP group.
    GroupName string
    The name of the IdP group.
    GroupDescription string
    The description of the IdP group.
    GroupId string
    The ID of the IdP group.
    GroupName string
    The name of the IdP group.
    groupDescription String
    The description of the IdP group.
    groupId String
    The ID of the IdP group.
    groupName String
    The name of the IdP group.
    groupDescription string
    The description of the IdP group.
    groupId string
    The ID of the IdP group.
    groupName string
    The name of the IdP group.
    group_description str
    The description of the IdP group.
    group_id str
    The ID of the IdP group.
    group_name str
    The name of the IdP group.
    groupDescription String
    The description of the IdP group.
    groupId String
    The ID of the IdP group.
    groupName String
    The name of the IdP group.

    Import

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

    $ pulumi import github:index/teamSyncGroupMapping:TeamSyncGroupMapping example some_team
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    GitHub pulumi/pulumi-github
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the github Terraform Provider.
    github logo
    GitHub v6.3.0 published on Monday, Sep 16, 2024 by Pulumi