### Install GitHub Provider with go get Source: https://github.com/pulumi/pulumi-github/blob/master/sdk/python/README.md To use the GitHub provider from Go, use `go get` to install the latest version of the library. ```bash go get github.com/pulumi/pulumi-github/sdk/v6 ``` -------------------------------- ### Install GitHub Provider with pip Source: https://github.com/pulumi/pulumi-github/blob/master/sdk/python/README.md To use the GitHub provider from Python, install it using pip. ```bash pip install pulumi-github ``` -------------------------------- ### Install GitHub Provider with dotnet add package Source: https://github.com/pulumi/pulumi-github/blob/master/sdk/python/README.md To use the GitHub provider from .NET, install it using `dotnet add package`. ```bash dotnet add package Pulumi.Github ``` -------------------------------- ### Install GitHub Provider with npm Source: https://github.com/pulumi/pulumi-github/blob/master/sdk/python/README.md To use the GitHub provider from JavaScript or TypeScript in Node.js, install it using npm. ```bash npm install @pulumi/github ``` -------------------------------- ### Install GitHub Provider with yarn Source: https://github.com/pulumi/pulumi-github/blob/master/sdk/python/README.md To use the GitHub provider from JavaScript or TypeScript in Node.js, install it using yarn. ```bash yarn add @pulumi/github ``` -------------------------------- ### Configure GitHub Owner for App Installation in Pulumi.yaml Source: https://github.com/pulumi/pulumi-github/blob/master/docs/_index.md Configure the GitHub provider for GitHub App installation authentication by setting the 'owner' argument in Pulumi.yaml. The 'owner' parameter is required for app installations. ```yaml name: configuration-example runtime: config: github:owner: value: 'TODO: var.github_organization' ``` -------------------------------- ### Add User to Organization (C#) Source: https://github.com/pulumi/pulumi-github/blob/master/docs/_index.md Example of adding a user to a GitHub organization using the Pulumi Github provider in C#. ```csharp using System.Collections.Generic; using System.Linq; using Pulumi; using Github = Pulumi.Github; return await Deployment.RunAsync(() => { // Add a user to the organization var membershipForUserX = new Github.Membership("membership_for_user_x"); }); ``` -------------------------------- ### Add User to Organization (Java) Source: https://github.com/pulumi/pulumi-github/blob/master/docs/_index.md Example of adding a user to a GitHub organization using the Pulumi Github provider in Java. ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.github.Membership; import java.util.ArrayList; import java.util.Arrays; 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 user to the organization var membershipForUserX = new Membership("membershipForUserX"); } } ``` -------------------------------- ### Add User to Organization (Go) Source: https://github.com/pulumi/pulumi-github/blob/master/docs/_index.md Example of adding a user to an organization using the Pulumi GitHub provider in Go. Requires Pulumi Go SDK and GitHub provider. ```yaml # Pulumi.yaml provider configuration file name: configuration-example runtime: go ``` ```go 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 user to the organization _, err := github.NewMembership(ctx, "membership_for_user_x", nil) if err != nil { return err } return nil }) } ``` -------------------------------- ### Add User to Organization (Python) Source: https://github.com/pulumi/pulumi-github/blob/master/docs/_index.md Example of adding a user to a GitHub organization using the Pulumi Github provider in Python. ```python import pulumi import pulumi_github as github # Add a user to the organization membership_for_user_x = github.Membership("membership_for_user_x") ``` -------------------------------- ### Add User to Organization (Go) Source: https://github.com/pulumi/pulumi-github/blob/master/docs/_index.md Example of adding a user to a GitHub organization using the Pulumi Github provider in Go. ```go 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 user to the organization _, err := github.NewMembership(ctx, "membership_for_user_x", nil) if err != nil { return err } return nil }) } ``` -------------------------------- ### Add User to Organization (Java) Source: https://github.com/pulumi/pulumi-github/blob/master/docs/_index.md Example of adding a user to an organization using the Pulumi GitHub provider in Java. Requires Pulumi Java SDK and GitHub provider. ```yaml # Pulumi.yaml provider configuration file name: configuration-example runtime: java ``` ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.github.Membership; import java.util.ArrayList; import java.util.Arrays; 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 user to the organization var membershipForUserX = new Membership("membershipForUserX"); } } ``` -------------------------------- ### Add User to Organization (YAML) Source: https://github.com/pulumi/pulumi-github/blob/master/docs/_index.md Example of adding a user to a GitHub organization using the Pulumi Github provider in YAML. ```yaml resources: # Add a user to the organization membershipForUserX: type: github:Membership name: membership_for_user_x ``` -------------------------------- ### Add User to Organization (YAML) Source: https://github.com/pulumi/pulumi-github/blob/master/docs/_index.md Example of adding a user to an organization using the Pulumi GitHub provider in YAML configuration. This defines the resource directly. ```yaml # Pulumi.yaml provider configuration file name: configuration-example runtime: yaml ``` ```yaml resources: # Add a user to the organization membershipForUserX: type: github:Membership name: membership_for_user_x ``` -------------------------------- ### Add User to Organization (TypeScript) Source: https://github.com/pulumi/pulumi-github/blob/master/docs/_index.md Example of adding a user to a GitHub organization using the Pulumi Github provider in TypeScript. ```typescript import * as pulumi from "@pulumi/pulumi"; import * as github from "@pulumi/github"; // Add a user to the organization const membershipForUserX = new github.Membership("membership_for_user_x", {}); ``` -------------------------------- ### Build SDKs for Pulumi GitHub Provider Source: https://github.com/pulumi/pulumi-github/blob/master/CONTRIBUTING.md Run this command from the root of the repository to generate and check in SDKs. Ensure dependencies are up-to-date by running `go mod tidy` in the `provider/` directory if unexpected diffs occur. ```bash make build_sdks ``` -------------------------------- ### Configure GitHub Token in Pulumi.yaml Source: https://github.com/pulumi/pulumi-github/blob/master/docs/_index.md Configure the GitHub provider to use a Personal Access Token by setting the 'token' argument in the Pulumi.yaml file. This is useful for authenticating with the GitHub API. ```yaml name: configuration-example runtime: config: github:token: value: 'TODO: var.token' ``` -------------------------------- ### Pulumi.yaml Configuration Source: https://github.com/pulumi/pulumi-github/blob/master/docs/_index.md Specifies the project name and runtime for a Pulumi project using the Github provider. ```yaml name: configuration-example runtime: nodejs ``` ```yaml name: configuration-example runtime: python ``` ```yaml name: configuration-example runtime: dotnet ``` ```yaml name: configuration-example runtime: go ``` ```yaml name: configuration-example runtime: yaml ``` ```yaml name: configuration-example runtime: java ``` -------------------------------- ### Github Provider Configuration (HCL) Source: https://github.com/pulumi/pulumi-github/blob/master/docs/_index.md Configures the Pulumi Github provider using HCL, specifying the provider source. ```hcl pulumi { required_providers { github = { source = "pulumi/github" } } } # Add a user to the organization resource "github_membership" "membership_for_user_x" { } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.