1. Packages
  2. GitHub
  3. API Docs
  4. EnterpriseOrganization
GitHub v6.1.0 published on Monday, Mar 11, 2024 by Pulumi

github.EnterpriseOrganization

Explore with Pulumi AI

github logo
GitHub v6.1.0 published on Monday, Mar 11, 2024 by Pulumi

    This resource allows you to create and manage a GitHub enterprise organization.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const org = new github.EnterpriseOrganization("org", {
        enterpriseId: data.github_enterprise.enterprise.id,
        displayName: "Some Awesome Org",
        description: "Organization created with terraform",
        billingEmail: "jon@winteriscoming.com",
        adminLogins: ["jon-snow"],
    });
    
    import pulumi
    import pulumi_github as github
    
    org = github.EnterpriseOrganization("org",
        enterprise_id=data["github_enterprise"]["enterprise"]["id"],
        display_name="Some Awesome Org",
        description="Organization created with terraform",
        billing_email="jon@winteriscoming.com",
        admin_logins=["jon-snow"])
    
    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 {
    		_, err := github.NewEnterpriseOrganization(ctx, "org", &github.EnterpriseOrganizationArgs{
    			EnterpriseId: pulumi.Any(data.Github_enterprise.Enterprise.Id),
    			DisplayName:  pulumi.String("Some Awesome Org"),
    			Description:  pulumi.String("Organization created with terraform"),
    			BillingEmail: pulumi.String("jon@winteriscoming.com"),
    			AdminLogins: pulumi.StringArray{
    				pulumi.String("jon-snow"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var org = new Github.EnterpriseOrganization("org", new()
        {
            EnterpriseId = data.Github_enterprise.Enterprise.Id,
            DisplayName = "Some Awesome Org",
            Description = "Organization created with terraform",
            BillingEmail = "jon@winteriscoming.com",
            AdminLogins = new[]
            {
                "jon-snow",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.EnterpriseOrganization;
    import com.pulumi.github.EnterpriseOrganizationArgs;
    import java.util.List;
    import java.util.ArrayList;
    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) {
            var org = new EnterpriseOrganization("org", EnterpriseOrganizationArgs.builder()        
                .enterpriseId(data.github_enterprise().enterprise().id())
                .displayName("Some Awesome Org")
                .description("Organization created with terraform")
                .billingEmail("jon@winteriscoming.com")
                .adminLogins("jon-snow")
                .build());
    
        }
    }
    
    resources:
      org:
        type: github:EnterpriseOrganization
        properties:
          enterpriseId: ${data.github_enterprise.enterprise.id}
          displayName: Some Awesome Org
          description: Organization created with terraform
          billingEmail: jon@winteriscoming.com
          adminLogins:
            - jon-snow
    

    Create EnterpriseOrganization Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EnterpriseOrganization(name: string, args: EnterpriseOrganizationArgs, opts?: CustomResourceOptions);
    @overload
    def EnterpriseOrganization(resource_name: str,
                               args: EnterpriseOrganizationArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def EnterpriseOrganization(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               admin_logins: Optional[Sequence[str]] = None,
                               billing_email: Optional[str] = None,
                               enterprise_id: Optional[str] = None,
                               description: Optional[str] = None,
                               display_name: Optional[str] = None,
                               name: Optional[str] = None)
    func NewEnterpriseOrganization(ctx *Context, name string, args EnterpriseOrganizationArgs, opts ...ResourceOption) (*EnterpriseOrganization, error)
    public EnterpriseOrganization(string name, EnterpriseOrganizationArgs args, CustomResourceOptions? opts = null)
    public EnterpriseOrganization(String name, EnterpriseOrganizationArgs args)
    public EnterpriseOrganization(String name, EnterpriseOrganizationArgs args, CustomResourceOptions options)
    
    type: github:EnterpriseOrganization
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args EnterpriseOrganizationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args EnterpriseOrganizationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args EnterpriseOrganizationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnterpriseOrganizationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnterpriseOrganizationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var enterpriseOrganizationResource = new Github.EnterpriseOrganization("enterpriseOrganizationResource", new()
    {
        AdminLogins = new[]
        {
            "string",
        },
        BillingEmail = "string",
        EnterpriseId = "string",
        Description = "string",
        DisplayName = "string",
        Name = "string",
    });
    
    example, err := github.NewEnterpriseOrganization(ctx, "enterpriseOrganizationResource", &github.EnterpriseOrganizationArgs{
    	AdminLogins: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	BillingEmail: pulumi.String("string"),
    	EnterpriseId: pulumi.String("string"),
    	Description:  pulumi.String("string"),
    	DisplayName:  pulumi.String("string"),
    	Name:         pulumi.String("string"),
    })
    
    var enterpriseOrganizationResource = new EnterpriseOrganization("enterpriseOrganizationResource", EnterpriseOrganizationArgs.builder()        
        .adminLogins("string")
        .billingEmail("string")
        .enterpriseId("string")
        .description("string")
        .displayName("string")
        .name("string")
        .build());
    
    enterprise_organization_resource = github.EnterpriseOrganization("enterpriseOrganizationResource",
        admin_logins=["string"],
        billing_email="string",
        enterprise_id="string",
        description="string",
        display_name="string",
        name="string")
    
    const enterpriseOrganizationResource = new github.EnterpriseOrganization("enterpriseOrganizationResource", {
        adminLogins: ["string"],
        billingEmail: "string",
        enterpriseId: "string",
        description: "string",
        displayName: "string",
        name: "string",
    });
    
    type: github:EnterpriseOrganization
    properties:
        adminLogins:
            - string
        billingEmail: string
        description: string
        displayName: string
        enterpriseId: string
        name: string
    

    EnterpriseOrganization Resource Properties

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

    Inputs

    The EnterpriseOrganization resource accepts the following input properties:

    AdminLogins List<string>
    List of organization owner usernames.
    BillingEmail string
    The billing email address.
    EnterpriseId string
    The ID of the enterprise.
    Description string
    The description of the organization.
    DisplayName string
    The display name of the organization.
    Name string
    The name of the organization.
    AdminLogins []string
    List of organization owner usernames.
    BillingEmail string
    The billing email address.
    EnterpriseId string
    The ID of the enterprise.
    Description string
    The description of the organization.
    DisplayName string
    The display name of the organization.
    Name string
    The name of the organization.
    adminLogins List<String>
    List of organization owner usernames.
    billingEmail String
    The billing email address.
    enterpriseId String
    The ID of the enterprise.
    description String
    The description of the organization.
    displayName String
    The display name of the organization.
    name String
    The name of the organization.
    adminLogins string[]
    List of organization owner usernames.
    billingEmail string
    The billing email address.
    enterpriseId string
    The ID of the enterprise.
    description string
    The description of the organization.
    displayName string
    The display name of the organization.
    name string
    The name of the organization.
    admin_logins Sequence[str]
    List of organization owner usernames.
    billing_email str
    The billing email address.
    enterprise_id str
    The ID of the enterprise.
    description str
    The description of the organization.
    display_name str
    The display name of the organization.
    name str
    The name of the organization.
    adminLogins List<String>
    List of organization owner usernames.
    billingEmail String
    The billing email address.
    enterpriseId String
    The ID of the enterprise.
    description String
    The description of the organization.
    displayName String
    The display name of the organization.
    name String
    The name of the organization.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EnterpriseOrganization resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing EnterpriseOrganization Resource

    Get an existing EnterpriseOrganization 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?: EnterpriseOrganizationState, opts?: CustomResourceOptions): EnterpriseOrganization
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            admin_logins: Optional[Sequence[str]] = None,
            billing_email: Optional[str] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            enterprise_id: Optional[str] = None,
            name: Optional[str] = None) -> EnterpriseOrganization
    func GetEnterpriseOrganization(ctx *Context, name string, id IDInput, state *EnterpriseOrganizationState, opts ...ResourceOption) (*EnterpriseOrganization, error)
    public static EnterpriseOrganization Get(string name, Input<string> id, EnterpriseOrganizationState? state, CustomResourceOptions? opts = null)
    public static EnterpriseOrganization get(String name, Output<String> id, EnterpriseOrganizationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    AdminLogins List<string>
    List of organization owner usernames.
    BillingEmail string
    The billing email address.
    Description string
    The description of the organization.
    DisplayName string
    The display name of the organization.
    EnterpriseId string
    The ID of the enterprise.
    Name string
    The name of the organization.
    AdminLogins []string
    List of organization owner usernames.
    BillingEmail string
    The billing email address.
    Description string
    The description of the organization.
    DisplayName string
    The display name of the organization.
    EnterpriseId string
    The ID of the enterprise.
    Name string
    The name of the organization.
    adminLogins List<String>
    List of organization owner usernames.
    billingEmail String
    The billing email address.
    description String
    The description of the organization.
    displayName String
    The display name of the organization.
    enterpriseId String
    The ID of the enterprise.
    name String
    The name of the organization.
    adminLogins string[]
    List of organization owner usernames.
    billingEmail string
    The billing email address.
    description string
    The description of the organization.
    displayName string
    The display name of the organization.
    enterpriseId string
    The ID of the enterprise.
    name string
    The name of the organization.
    admin_logins Sequence[str]
    List of organization owner usernames.
    billing_email str
    The billing email address.
    description str
    The description of the organization.
    display_name str
    The display name of the organization.
    enterprise_id str
    The ID of the enterprise.
    name str
    The name of the organization.
    adminLogins List<String>
    List of organization owner usernames.
    billingEmail String
    The billing email address.
    description String
    The description of the organization.
    displayName String
    The display name of the organization.
    enterpriseId String
    The ID of the enterprise.
    name String
    The name of the organization.

    Import

    GitHub Enterprise Organization can be imported using the slug of the enterprise, combined with the orgname of the organization, separated by a / character.

    $ pulumi import github:index/enterpriseOrganization:EnterpriseOrganization org enterp/some-awesome-org
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    GitHub pulumi/pulumi-github
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the github Terraform Provider.
    github logo
    GitHub v6.1.0 published on Monday, Mar 11, 2024 by Pulumi