github.Team
Explore with Pulumi AI
Provides a GitHub team resource.
This resource allows you to add/remove teams from your organization. When applied, a new team will be created. When destroyed, that team will be removed.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
// Add a team to the organization
const someTeam = new github.Team("some_team", {
name: "some-team",
description: "Some cool team",
privacy: "closed",
});
import pulumi
import pulumi_github as github
# Add a team to the organization
some_team = github.Team("some_team",
name="some-team",
description="Some cool team",
privacy="closed")
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Add a team to the organization
_, err := github.NewTeam(ctx, "some_team", &github.TeamArgs{
Name: pulumi.String("some-team"),
Description: pulumi.String("Some cool team"),
Privacy: pulumi.String("closed"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
// Add a team to the organization
var someTeam = new Github.Team("some_team", new()
{
Name = "some-team",
Description = "Some cool team",
Privacy = "closed",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.Team;
import com.pulumi.github.TeamArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Add a team to the organization
var someTeam = new Team("someTeam", TeamArgs.builder()
.name("some-team")
.description("Some cool team")
.privacy("closed")
.build());
}
}
resources:
# Add a team to the organization
someTeam:
type: github:Team
name: some_team
properties:
name: some-team
description: Some cool team
privacy: closed
Create Team Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Team(name: string, args?: TeamArgs, opts?: CustomResourceOptions);
@overload
def Team(resource_name: str,
args: Optional[TeamArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Team(resource_name: str,
opts: Optional[ResourceOptions] = None,
create_default_maintainer: Optional[bool] = None,
description: Optional[str] = None,
ldap_dn: Optional[str] = None,
name: Optional[str] = None,
parent_team_id: Optional[str] = None,
parent_team_read_id: Optional[str] = None,
parent_team_read_slug: Optional[str] = None,
privacy: Optional[str] = None)
func NewTeam(ctx *Context, name string, args *TeamArgs, opts ...ResourceOption) (*Team, error)
public Team(string name, TeamArgs? args = null, CustomResourceOptions? opts = null)
type: github:Team
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 TeamArgs
- 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 TeamArgs
- 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 TeamArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TeamArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TeamArgs
- 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 teamResource = new Github.Team("teamResource", new()
{
CreateDefaultMaintainer = false,
Description = "string",
LdapDn = "string",
Name = "string",
ParentTeamId = "string",
ParentTeamReadId = "string",
ParentTeamReadSlug = "string",
Privacy = "string",
});
example, err := github.NewTeam(ctx, "teamResource", &github.TeamArgs{
CreateDefaultMaintainer: pulumi.Bool(false),
Description: pulumi.String("string"),
LdapDn: pulumi.String("string"),
Name: pulumi.String("string"),
ParentTeamId: pulumi.String("string"),
ParentTeamReadId: pulumi.String("string"),
ParentTeamReadSlug: pulumi.String("string"),
Privacy: pulumi.String("string"),
})
var teamResource = new Team("teamResource", TeamArgs.builder()
.createDefaultMaintainer(false)
.description("string")
.ldapDn("string")
.name("string")
.parentTeamId("string")
.parentTeamReadId("string")
.parentTeamReadSlug("string")
.privacy("string")
.build());
team_resource = github.Team("teamResource",
create_default_maintainer=False,
description="string",
ldap_dn="string",
name="string",
parent_team_id="string",
parent_team_read_id="string",
parent_team_read_slug="string",
privacy="string")
const teamResource = new github.Team("teamResource", {
createDefaultMaintainer: false,
description: "string",
ldapDn: "string",
name: "string",
parentTeamId: "string",
parentTeamReadId: "string",
parentTeamReadSlug: "string",
privacy: "string",
});
type: github:Team
properties:
createDefaultMaintainer: false
description: string
ldapDn: string
name: string
parentTeamId: string
parentTeamReadId: string
parentTeamReadSlug: string
privacy: string
Team Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Team resource accepts the following input properties:
- Create
Default boolMaintainer - Adds a default maintainer to the team. Defaults to
false
and adds the creating user to the team whentrue
. - Description string
- A description of the team.
- Ldap
Dn string - The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server.
- Name string
- The name of the team.
- Parent
Team stringId - The ID or slug of the parent team, if this is a nested team.
- Parent
Team stringRead Id - The id of the parent team read in Github.
- Parent
Team stringRead Slug - The id of the parent team read in Github.
- Privacy string
- The level of privacy for the team. Must be one of
secret
orclosed
. Defaults tosecret
.
- Create
Default boolMaintainer - Adds a default maintainer to the team. Defaults to
false
and adds the creating user to the team whentrue
. - Description string
- A description of the team.
- Ldap
Dn string - The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server.
- Name string
- The name of the team.
- Parent
Team stringId - The ID or slug of the parent team, if this is a nested team.
- Parent
Team stringRead Id - The id of the parent team read in Github.
- Parent
Team stringRead Slug - The id of the parent team read in Github.
- Privacy string
- The level of privacy for the team. Must be one of
secret
orclosed
. Defaults tosecret
.
- create
Default BooleanMaintainer - Adds a default maintainer to the team. Defaults to
false
and adds the creating user to the team whentrue
. - description String
- A description of the team.
- ldap
Dn String - The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server.
- name String
- The name of the team.
- parent
Team StringId - The ID or slug of the parent team, if this is a nested team.
- parent
Team StringRead Id - The id of the parent team read in Github.
- parent
Team StringRead Slug - The id of the parent team read in Github.
- privacy String
- The level of privacy for the team. Must be one of
secret
orclosed
. Defaults tosecret
.
- create
Default booleanMaintainer - Adds a default maintainer to the team. Defaults to
false
and adds the creating user to the team whentrue
. - description string
- A description of the team.
- ldap
Dn string - The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server.
- name string
- The name of the team.
- parent
Team stringId - The ID or slug of the parent team, if this is a nested team.
- parent
Team stringRead Id - The id of the parent team read in Github.
- parent
Team stringRead Slug - The id of the parent team read in Github.
- privacy string
- The level of privacy for the team. Must be one of
secret
orclosed
. Defaults tosecret
.
- create_
default_ boolmaintainer - Adds a default maintainer to the team. Defaults to
false
and adds the creating user to the team whentrue
. - description str
- A description of the team.
- ldap_
dn str - The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server.
- name str
- The name of the team.
- parent_
team_ strid - The ID or slug of the parent team, if this is a nested team.
- parent_
team_ strread_ id - The id of the parent team read in Github.
- parent_
team_ strread_ slug - The id of the parent team read in Github.
- privacy str
- The level of privacy for the team. Must be one of
secret
orclosed
. Defaults tosecret
.
- create
Default BooleanMaintainer - Adds a default maintainer to the team. Defaults to
false
and adds the creating user to the team whentrue
. - description String
- A description of the team.
- ldap
Dn String - The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server.
- name String
- The name of the team.
- parent
Team StringId - The ID or slug of the parent team, if this is a nested team.
- parent
Team StringRead Id - The id of the parent team read in Github.
- parent
Team StringRead Slug - The id of the parent team read in Github.
- privacy String
- The level of privacy for the team. Must be one of
secret
orclosed
. Defaults tosecret
.
Outputs
All input properties are implicitly available as output properties. Additionally, the Team resource produces the following output properties:
- Etag string
- Id string
- The provider-assigned unique ID for this managed resource.
- Members
Count int - Node
Id string - The Node ID of the created team.
- Slug string
- The slug of the created team, which may or may not differ from
name
, depending on whethername
contains "URL-unsafe" characters. Useful when referencing the team ingithub.BranchProtection
.
- Etag string
- Id string
- The provider-assigned unique ID for this managed resource.
- Members
Count int - Node
Id string - The Node ID of the created team.
- Slug string
- The slug of the created team, which may or may not differ from
name
, depending on whethername
contains "URL-unsafe" characters. Useful when referencing the team ingithub.BranchProtection
.
- etag String
- id String
- The provider-assigned unique ID for this managed resource.
- members
Count Integer - node
Id String - The Node ID of the created team.
- slug String
- The slug of the created team, which may or may not differ from
name
, depending on whethername
contains "URL-unsafe" characters. Useful when referencing the team ingithub.BranchProtection
.
- etag string
- id string
- The provider-assigned unique ID for this managed resource.
- members
Count number - node
Id string - The Node ID of the created team.
- slug string
- The slug of the created team, which may or may not differ from
name
, depending on whethername
contains "URL-unsafe" characters. Useful when referencing the team ingithub.BranchProtection
.
- etag str
- id str
- The provider-assigned unique ID for this managed resource.
- members_
count int - node_
id str - The Node ID of the created team.
- slug str
- The slug of the created team, which may or may not differ from
name
, depending on whethername
contains "URL-unsafe" characters. Useful when referencing the team ingithub.BranchProtection
.
- etag String
- id String
- The provider-assigned unique ID for this managed resource.
- members
Count Number - node
Id String - The Node ID of the created team.
- slug String
- The slug of the created team, which may or may not differ from
name
, depending on whethername
contains "URL-unsafe" characters. Useful when referencing the team ingithub.BranchProtection
.
Look up Existing Team Resource
Get an existing Team 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?: TeamState, opts?: CustomResourceOptions): Team
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_default_maintainer: Optional[bool] = None,
description: Optional[str] = None,
etag: Optional[str] = None,
ldap_dn: Optional[str] = None,
members_count: Optional[int] = None,
name: Optional[str] = None,
node_id: Optional[str] = None,
parent_team_id: Optional[str] = None,
parent_team_read_id: Optional[str] = None,
parent_team_read_slug: Optional[str] = None,
privacy: Optional[str] = None,
slug: Optional[str] = None) -> Team
func GetTeam(ctx *Context, name string, id IDInput, state *TeamState, opts ...ResourceOption) (*Team, error)
public static Team Get(string name, Input<string> id, TeamState? state, CustomResourceOptions? opts = null)
public static Team get(String name, Output<String> id, TeamState 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.
- Create
Default boolMaintainer - Adds a default maintainer to the team. Defaults to
false
and adds the creating user to the team whentrue
. - Description string
- A description of the team.
- Etag string
- Ldap
Dn string - The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server.
- Members
Count int - Name string
- The name of the team.
- Node
Id string - The Node ID of the created team.
- Parent
Team stringId - The ID or slug of the parent team, if this is a nested team.
- Parent
Team stringRead Id - The id of the parent team read in Github.
- Parent
Team stringRead Slug - The id of the parent team read in Github.
- Privacy string
- The level of privacy for the team. Must be one of
secret
orclosed
. Defaults tosecret
. - Slug string
- The slug of the created team, which may or may not differ from
name
, depending on whethername
contains "URL-unsafe" characters. Useful when referencing the team ingithub.BranchProtection
.
- Create
Default boolMaintainer - Adds a default maintainer to the team. Defaults to
false
and adds the creating user to the team whentrue
. - Description string
- A description of the team.
- Etag string
- Ldap
Dn string - The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server.
- Members
Count int - Name string
- The name of the team.
- Node
Id string - The Node ID of the created team.
- Parent
Team stringId - The ID or slug of the parent team, if this is a nested team.
- Parent
Team stringRead Id - The id of the parent team read in Github.
- Parent
Team stringRead Slug - The id of the parent team read in Github.
- Privacy string
- The level of privacy for the team. Must be one of
secret
orclosed
. Defaults tosecret
. - Slug string
- The slug of the created team, which may or may not differ from
name
, depending on whethername
contains "URL-unsafe" characters. Useful when referencing the team ingithub.BranchProtection
.
- create
Default BooleanMaintainer - Adds a default maintainer to the team. Defaults to
false
and adds the creating user to the team whentrue
. - description String
- A description of the team.
- etag String
- ldap
Dn String - The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server.
- members
Count Integer - name String
- The name of the team.
- node
Id String - The Node ID of the created team.
- parent
Team StringId - The ID or slug of the parent team, if this is a nested team.
- parent
Team StringRead Id - The id of the parent team read in Github.
- parent
Team StringRead Slug - The id of the parent team read in Github.
- privacy String
- The level of privacy for the team. Must be one of
secret
orclosed
. Defaults tosecret
. - slug String
- The slug of the created team, which may or may not differ from
name
, depending on whethername
contains "URL-unsafe" characters. Useful when referencing the team ingithub.BranchProtection
.
- create
Default booleanMaintainer - Adds a default maintainer to the team. Defaults to
false
and adds the creating user to the team whentrue
. - description string
- A description of the team.
- etag string
- ldap
Dn string - The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server.
- members
Count number - name string
- The name of the team.
- node
Id string - The Node ID of the created team.
- parent
Team stringId - The ID or slug of the parent team, if this is a nested team.
- parent
Team stringRead Id - The id of the parent team read in Github.
- parent
Team stringRead Slug - The id of the parent team read in Github.
- privacy string
- The level of privacy for the team. Must be one of
secret
orclosed
. Defaults tosecret
. - slug string
- The slug of the created team, which may or may not differ from
name
, depending on whethername
contains "URL-unsafe" characters. Useful when referencing the team ingithub.BranchProtection
.
- create_
default_ boolmaintainer - Adds a default maintainer to the team. Defaults to
false
and adds the creating user to the team whentrue
. - description str
- A description of the team.
- etag str
- ldap_
dn str - The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server.
- members_
count int - name str
- The name of the team.
- node_
id str - The Node ID of the created team.
- parent_
team_ strid - The ID or slug of the parent team, if this is a nested team.
- parent_
team_ strread_ id - The id of the parent team read in Github.
- parent_
team_ strread_ slug - The id of the parent team read in Github.
- privacy str
- The level of privacy for the team. Must be one of
secret
orclosed
. Defaults tosecret
. - slug str
- The slug of the created team, which may or may not differ from
name
, depending on whethername
contains "URL-unsafe" characters. Useful when referencing the team ingithub.BranchProtection
.
- create
Default BooleanMaintainer - Adds a default maintainer to the team. Defaults to
false
and adds the creating user to the team whentrue
. - description String
- A description of the team.
- etag String
- ldap
Dn String - The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server.
- members
Count Number - name String
- The name of the team.
- node
Id String - The Node ID of the created team.
- parent
Team StringId - The ID or slug of the parent team, if this is a nested team.
- parent
Team StringRead Id - The id of the parent team read in Github.
- parent
Team StringRead Slug - The id of the parent team read in Github.
- privacy String
- The level of privacy for the team. Must be one of
secret
orclosed
. Defaults tosecret
. - slug String
- The slug of the created team, which may or may not differ from
name
, depending on whethername
contains "URL-unsafe" characters. Useful when referencing the team ingithub.BranchProtection
.
Import
GitHub Teams can be imported using the GitHub team ID or name e.g.
$ pulumi import github:index/team:Team core 1234567
$ pulumi import github:index/team:Team core Administrators
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.