import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a GitHub team members resource. * * This resource allows you to manage members of teams in your organization. It sets the requested team members for the team and removes all users not managed by Terraform. * * When applied, if the user hasn't accepted their invitation to the organization, they won't be part of the team until they do. * * When destroyed, all users will be removed from the team. * * > **Note** This resource is not compatible with `github.TeamMembership`. Use either `github.TeamMembers` or `github.TeamMembership`. * * > **Note** You can accidentally lock yourself out of your team using this resource. Deleting a `github.TeamMembers` resource removes access from anyone without organization-level access to the team. Proceed with caution. It should generally only be used with teams fully managed by Terraform. * * > **Note** Attempting to set a user who is an organization owner to "member" will result in the user being granted "maintainer" instead; this can result in a perpetual `terraform plan` diff that changes their status back to "member". * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * // Add a user to the organization * const membershipForSomeUser = new github.Membership("membership_for_some_user", { * username: "SomeUser", * role: "member", * }); * const membershipForAnotherUser = new github.Membership("membership_for_another_user", { * username: "AnotherUser", * role: "member", * }); * const someTeam = new github.Team("some_team", { * name: "SomeTeam", * description: "Some cool team", * }); * const someTeamMembers = new github.TeamMembers("some_team_members", { * teamId: someTeam.id, * members: [ * { * username: "SomeUser", * role: "maintainer", * }, * { * username: "AnotherUser", * role: "member", * }, * ], * }); * ``` * * ## Import * * > **Note** Although the team id or team slug can be used it is recommended to use the team id. Using the team slug will result in terraform doing conversions between the team slug and team id. This will cause team members associations to the team to be destroyed and recreated on import. * * GitHub Team Membership can be imported using the team ID team id or team slug, e.g. * * ```sh * $ pulumi import github:index/teamMembers:TeamMembers some_team 1234567 * $ pulumi import github:index/teamMembers:TeamMembers some_team Administrators * ``` */ export declare class TeamMembers extends pulumi.CustomResource { /** * Get an existing TeamMembers resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: TeamMembersState, opts?: pulumi.CustomResourceOptions): TeamMembers; /** * Returns true if the given object is an instance of TeamMembers. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is TeamMembers; /** * List of team members. See Members below for details. */ readonly members: pulumi.Output; /** * The team id or the team slug * * > **Note** Although the team id or team slug can be used it is recommended to use the team id. Using the team slug will cause the team members associations to the team to be destroyed and recreated if the team name is updated. */ readonly teamId: pulumi.Output; /** * Create a TeamMembers resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: TeamMembersArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TeamMembers resources. */ export interface TeamMembersState { /** * List of team members. See Members below for details. */ members?: pulumi.Input[] | undefined>; /** * The team id or the team slug * * > **Note** Although the team id or team slug can be used it is recommended to use the team id. Using the team slug will cause the team members associations to the team to be destroyed and recreated if the team name is updated. */ teamId?: pulumi.Input; } /** * The set of arguments for constructing a TeamMembers resource. */ export interface TeamMembersArgs { /** * List of team members. See Members below for details. */ members: pulumi.Input[]>; /** * The team id or the team slug * * > **Note** Although the team id or team slug can be used it is recommended to use the team id. Using the team slug will cause the team members associations to the team to be destroyed and recreated if the team name is updated. */ teamId: pulumi.Input; } //# sourceMappingURL=teamMembers.d.ts.map