TeamMembership
Provides a GitHub team membership resource.
This resource allows you to add/remove users from teams in your organization. When applied, the user will be added to the team. If the user hasn’t accepted their invitation to the organization, they won’t be part of the team until they do. When destroyed, the user will be removed from the team.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
// Add a user to the organization
var membershipForSomeUser = new Github.Membership("membershipForSomeUser", new Github.MembershipArgs
{
Role = "member",
Username = "SomeUser",
});
var someTeam = new Github.Team("someTeam", new Github.TeamArgs
{
Description = "Some cool team",
});
var someTeamMembership = new Github.TeamMembership("someTeamMembership", new Github.TeamMembershipArgs
{
Role = "member",
TeamId = someTeam.Id,
Username = "SomeUser",
});
}
}
Coming soon!
import pulumi
import pulumi_github as github
# Add a user to the organization
membership_for_some_user = github.Membership("membershipForSomeUser",
role="member",
username="SomeUser")
some_team = github.Team("someTeam", description="Some cool team")
some_team_membership = github.TeamMembership("someTeamMembership",
role="member",
team_id=some_team.id,
username="SomeUser")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", {
role: "member",
username: "SomeUser",
});
const someTeam = new github.Team("some_team", {
description: "Some cool team",
});
const someTeamMembership = new github.TeamMembership("some_team_membership", {
role: "member",
teamId: someTeam.id,
username: "SomeUser",
});Create a TeamMembership Resource
new TeamMembership(name: string, args: TeamMembershipArgs, opts?: CustomResourceOptions);def TeamMembership(resource_name, opts=None, role=None, team_id=None, username=None, __props__=None);func NewTeamMembership(ctx *Context, name string, args TeamMembershipArgs, opts ...ResourceOption) (*TeamMembership, error)public TeamMembership(string name, TeamMembershipArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args TeamMembershipArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TeamMembershipArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TeamMembershipArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
TeamMembership Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The TeamMembership resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the TeamMembership resource produces the following output properties:
Look up an Existing TeamMembership Resource
Get an existing TeamMembership 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?: TeamMembershipState, opts?: CustomResourceOptions): TeamMembershipstatic get(resource_name, id, opts=None, etag=None, role=None, team_id=None, username=None, __props__=None);func GetTeamMembership(ctx *Context, name string, id IDInput, state *TeamMembershipState, opts ...ResourceOption) (*TeamMembership, error)public static TeamMembership Get(string name, Input<string> id, TeamMembershipState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
Package Details
- Repository
- https://github.com/pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
githubTerraform Provider.