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
new Membership(name: string, args: MembershipArgs, opts?: CustomResourceOptions);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:
Outputs
All input properties are implicitly available as output properties. Additionally, the Membership resource produces the following output properties:
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): Membershipstatic 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:
Package Details
- Repository
- https://github.com/pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
githubTerraform Provider.