Membership

Provides a GitHub membership resource.

This resource allows you to add/remove users from your organization. When applied, an invitation will be sent to the user to become part of the organization. When destroyed, either the invitation will be cancelled or the user will be removed.

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",
        });
    }

}

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")
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",
});

Create a Membership Resource

def Membership(resource_name, opts=None, role=None, username=None, __props__=None);
func NewMembership(ctx *Context, name string, args MembershipArgs, opts ...ResourceOption) (*Membership, error)
public Membership(string name, MembershipArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args MembershipArgs
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 MembershipArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args MembershipArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Membership Resource Properties

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

Inputs

The Membership resource accepts the following input properties:

Username string

The user to add to the organization.

Role string

The role of the user within the organization. Must be one of member or admin. Defaults to member.

Username string

The user to add to the organization.

Role string

The role of the user within the organization. Must be one of member or admin. Defaults to member.

username string

The user to add to the organization.

role string

The role of the user within the organization. Must be one of member or admin. Defaults to member.

username str

The user to add to the organization.

role str

The role of the user within the organization. Must be one of member or admin. Defaults to member.

Outputs

All input properties are implicitly available as output properties. Additionally, the Membership 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 str
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Membership Resource

Get an existing Membership 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?: MembershipState, opts?: CustomResourceOptions): Membership
static get(resource_name, id, opts=None, etag=None, role=None, username=None, __props__=None);
func GetMembership(ctx *Context, name string, id IDInput, state *MembershipState, opts ...ResourceOption) (*Membership, error)
public static Membership Get(string name, Input<string> id, MembershipState? 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:

Etag string
Role string

The role of the user within the organization. Must be one of member or admin. Defaults to member.

Username string

The user to add to the organization.

Etag string
Role string

The role of the user within the organization. Must be one of member or admin. Defaults to member.

Username string

The user to add to the organization.

etag string
role string

The role of the user within the organization. Must be one of member or admin. Defaults to member.

username string

The user to add to the organization.

etag str
role str

The role of the user within the organization. Must be one of member or admin. Defaults to member.

username str

The user to add to the organization.

Package Details

Repository
https://github.com/pulumi/pulumi-github
License
Apache-2.0
Notes
This Pulumi package is based on the github Terraform Provider.