1. Packages
  2. Auth0
  3. API Docs
  4. OrganizationConnection
Auth0 v3.4.0 published on Wednesday, Jun 19, 2024 by Pulumi

auth0.OrganizationConnection

Explore with Pulumi AI

auth0 logo
Auth0 v3.4.0 published on Wednesday, Jun 19, 2024 by Pulumi

    With this resource, you can manage enabled connections on an organization.

    !> This resource appends a connection to an organization. In contrast, the auth0.OrganizationConnections resource manages all the connections enabled for an organization. To avoid potential issues, it is recommended not to use this resource in conjunction with the auth0.OrganizationConnections resource when managing enabled connections for the same organization id.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as auth0 from "@pulumi/auth0";
    
    const myConnection = new auth0.Connection("my_connection", {
        name: "My Connection",
        strategy: "auth0",
    });
    const myOrganization = new auth0.Organization("my_organization", {
        name: "my-organization",
        displayName: "My Organization",
    });
    const myOrgConn = new auth0.OrganizationConnection("my_org_conn", {
        organizationId: myOrganization.id,
        connectionId: myConnection.id,
        assignMembershipOnLogin: true,
        isSignupEnabled: false,
        showAsButton: true,
    });
    
    import pulumi
    import pulumi_auth0 as auth0
    
    my_connection = auth0.Connection("my_connection",
        name="My Connection",
        strategy="auth0")
    my_organization = auth0.Organization("my_organization",
        name="my-organization",
        display_name="My Organization")
    my_org_conn = auth0.OrganizationConnection("my_org_conn",
        organization_id=my_organization.id,
        connection_id=my_connection.id,
        assign_membership_on_login=True,
        is_signup_enabled=False,
        show_as_button=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myConnection, err := auth0.NewConnection(ctx, "my_connection", &auth0.ConnectionArgs{
    			Name:     pulumi.String("My Connection"),
    			Strategy: pulumi.String("auth0"),
    		})
    		if err != nil {
    			return err
    		}
    		myOrganization, err := auth0.NewOrganization(ctx, "my_organization", &auth0.OrganizationArgs{
    			Name:        pulumi.String("my-organization"),
    			DisplayName: pulumi.String("My Organization"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = auth0.NewOrganizationConnection(ctx, "my_org_conn", &auth0.OrganizationConnectionArgs{
    			OrganizationId:          myOrganization.ID(),
    			ConnectionId:            myConnection.ID(),
    			AssignMembershipOnLogin: pulumi.Bool(true),
    			IsSignupEnabled:         pulumi.Bool(false),
    			ShowAsButton:            pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Auth0 = Pulumi.Auth0;
    
    return await Deployment.RunAsync(() => 
    {
        var myConnection = new Auth0.Connection("my_connection", new()
        {
            Name = "My Connection",
            Strategy = "auth0",
        });
    
        var myOrganization = new Auth0.Organization("my_organization", new()
        {
            Name = "my-organization",
            DisplayName = "My Organization",
        });
    
        var myOrgConn = new Auth0.OrganizationConnection("my_org_conn", new()
        {
            OrganizationId = myOrganization.Id,
            ConnectionId = myConnection.Id,
            AssignMembershipOnLogin = true,
            IsSignupEnabled = false,
            ShowAsButton = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.auth0.Connection;
    import com.pulumi.auth0.ConnectionArgs;
    import com.pulumi.auth0.Organization;
    import com.pulumi.auth0.OrganizationArgs;
    import com.pulumi.auth0.OrganizationConnection;
    import com.pulumi.auth0.OrganizationConnectionArgs;
    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 myConnection = new Connection("myConnection", ConnectionArgs.builder()
                .name("My Connection")
                .strategy("auth0")
                .build());
    
            var myOrganization = new Organization("myOrganization", OrganizationArgs.builder()
                .name("my-organization")
                .displayName("My Organization")
                .build());
    
            var myOrgConn = new OrganizationConnection("myOrgConn", OrganizationConnectionArgs.builder()
                .organizationId(myOrganization.id())
                .connectionId(myConnection.id())
                .assignMembershipOnLogin(true)
                .isSignupEnabled(false)
                .showAsButton(true)
                .build());
    
        }
    }
    
    resources:
      myConnection:
        type: auth0:Connection
        name: my_connection
        properties:
          name: My Connection
          strategy: auth0
      myOrganization:
        type: auth0:Organization
        name: my_organization
        properties:
          name: my-organization
          displayName: My Organization
      myOrgConn:
        type: auth0:OrganizationConnection
        name: my_org_conn
        properties:
          organizationId: ${myOrganization.id}
          connectionId: ${myConnection.id}
          assignMembershipOnLogin: true
          isSignupEnabled: false
          showAsButton: true
    

    Create OrganizationConnection Resource

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

    Constructor syntax

    new OrganizationConnection(name: string, args: OrganizationConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def OrganizationConnection(resource_name: str,
                               args: OrganizationConnectionArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def OrganizationConnection(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               connection_id: Optional[str] = None,
                               organization_id: Optional[str] = None,
                               assign_membership_on_login: Optional[bool] = None,
                               is_signup_enabled: Optional[bool] = None,
                               show_as_button: Optional[bool] = None)
    func NewOrganizationConnection(ctx *Context, name string, args OrganizationConnectionArgs, opts ...ResourceOption) (*OrganizationConnection, error)
    public OrganizationConnection(string name, OrganizationConnectionArgs args, CustomResourceOptions? opts = null)
    public OrganizationConnection(String name, OrganizationConnectionArgs args)
    public OrganizationConnection(String name, OrganizationConnectionArgs args, CustomResourceOptions options)
    
    type: auth0:OrganizationConnection
    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 OrganizationConnectionArgs
    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 OrganizationConnectionArgs
    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 OrganizationConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OrganizationConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OrganizationConnectionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var organizationConnectionResource = new Auth0.OrganizationConnection("organizationConnectionResource", new()
    {
        ConnectionId = "string",
        OrganizationId = "string",
        AssignMembershipOnLogin = false,
        IsSignupEnabled = false,
        ShowAsButton = false,
    });
    
    example, err := auth0.NewOrganizationConnection(ctx, "organizationConnectionResource", &auth0.OrganizationConnectionArgs{
    	ConnectionId:            pulumi.String("string"),
    	OrganizationId:          pulumi.String("string"),
    	AssignMembershipOnLogin: pulumi.Bool(false),
    	IsSignupEnabled:         pulumi.Bool(false),
    	ShowAsButton:            pulumi.Bool(false),
    })
    
    var organizationConnectionResource = new OrganizationConnection("organizationConnectionResource", OrganizationConnectionArgs.builder()
        .connectionId("string")
        .organizationId("string")
        .assignMembershipOnLogin(false)
        .isSignupEnabled(false)
        .showAsButton(false)
        .build());
    
    organization_connection_resource = auth0.OrganizationConnection("organizationConnectionResource",
        connection_id="string",
        organization_id="string",
        assign_membership_on_login=False,
        is_signup_enabled=False,
        show_as_button=False)
    
    const organizationConnectionResource = new auth0.OrganizationConnection("organizationConnectionResource", {
        connectionId: "string",
        organizationId: "string",
        assignMembershipOnLogin: false,
        isSignupEnabled: false,
        showAsButton: false,
    });
    
    type: auth0:OrganizationConnection
    properties:
        assignMembershipOnLogin: false
        connectionId: string
        isSignupEnabled: false
        organizationId: string
        showAsButton: false
    

    OrganizationConnection 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 OrganizationConnection resource accepts the following input properties:

    ConnectionId string
    The ID of the connection to enable for the organization.
    OrganizationId string
    The ID of the organization to enable the connection for.
    AssignMembershipOnLogin bool
    When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.
    IsSignupEnabled bool
    Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
    ShowAsButton bool
    Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
    ConnectionId string
    The ID of the connection to enable for the organization.
    OrganizationId string
    The ID of the organization to enable the connection for.
    AssignMembershipOnLogin bool
    When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.
    IsSignupEnabled bool
    Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
    ShowAsButton bool
    Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
    connectionId String
    The ID of the connection to enable for the organization.
    organizationId String
    The ID of the organization to enable the connection for.
    assignMembershipOnLogin Boolean
    When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.
    isSignupEnabled Boolean
    Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
    showAsButton Boolean
    Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
    connectionId string
    The ID of the connection to enable for the organization.
    organizationId string
    The ID of the organization to enable the connection for.
    assignMembershipOnLogin boolean
    When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.
    isSignupEnabled boolean
    Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
    showAsButton boolean
    Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
    connection_id str
    The ID of the connection to enable for the organization.
    organization_id str
    The ID of the organization to enable the connection for.
    assign_membership_on_login bool
    When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.
    is_signup_enabled bool
    Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
    show_as_button bool
    Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
    connectionId String
    The ID of the connection to enable for the organization.
    organizationId String
    The ID of the organization to enable the connection for.
    assignMembershipOnLogin Boolean
    When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.
    isSignupEnabled Boolean
    Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
    showAsButton Boolean
    Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the enabled connection.
    Strategy string
    The strategy of the enabled connection.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the enabled connection.
    Strategy string
    The strategy of the enabled connection.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the enabled connection.
    strategy String
    The strategy of the enabled connection.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the enabled connection.
    strategy string
    The strategy of the enabled connection.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the enabled connection.
    strategy str
    The strategy of the enabled connection.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the enabled connection.
    strategy String
    The strategy of the enabled connection.

    Look up Existing OrganizationConnection Resource

    Get an existing OrganizationConnection 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?: OrganizationConnectionState, opts?: CustomResourceOptions): OrganizationConnection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            assign_membership_on_login: Optional[bool] = None,
            connection_id: Optional[str] = None,
            is_signup_enabled: Optional[bool] = None,
            name: Optional[str] = None,
            organization_id: Optional[str] = None,
            show_as_button: Optional[bool] = None,
            strategy: Optional[str] = None) -> OrganizationConnection
    func GetOrganizationConnection(ctx *Context, name string, id IDInput, state *OrganizationConnectionState, opts ...ResourceOption) (*OrganizationConnection, error)
    public static OrganizationConnection Get(string name, Input<string> id, OrganizationConnectionState? state, CustomResourceOptions? opts = null)
    public static OrganizationConnection get(String name, Output<String> id, OrganizationConnectionState 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:
    AssignMembershipOnLogin bool
    When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.
    ConnectionId string
    The ID of the connection to enable for the organization.
    IsSignupEnabled bool
    Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
    Name string
    The name of the enabled connection.
    OrganizationId string
    The ID of the organization to enable the connection for.
    ShowAsButton bool
    Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
    Strategy string
    The strategy of the enabled connection.
    AssignMembershipOnLogin bool
    When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.
    ConnectionId string
    The ID of the connection to enable for the organization.
    IsSignupEnabled bool
    Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
    Name string
    The name of the enabled connection.
    OrganizationId string
    The ID of the organization to enable the connection for.
    ShowAsButton bool
    Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
    Strategy string
    The strategy of the enabled connection.
    assignMembershipOnLogin Boolean
    When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.
    connectionId String
    The ID of the connection to enable for the organization.
    isSignupEnabled Boolean
    Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
    name String
    The name of the enabled connection.
    organizationId String
    The ID of the organization to enable the connection for.
    showAsButton Boolean
    Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
    strategy String
    The strategy of the enabled connection.
    assignMembershipOnLogin boolean
    When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.
    connectionId string
    The ID of the connection to enable for the organization.
    isSignupEnabled boolean
    Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
    name string
    The name of the enabled connection.
    organizationId string
    The ID of the organization to enable the connection for.
    showAsButton boolean
    Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
    strategy string
    The strategy of the enabled connection.
    assign_membership_on_login bool
    When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.
    connection_id str
    The ID of the connection to enable for the organization.
    is_signup_enabled bool
    Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
    name str
    The name of the enabled connection.
    organization_id str
    The ID of the organization to enable the connection for.
    show_as_button bool
    Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
    strategy str
    The strategy of the enabled connection.
    assignMembershipOnLogin Boolean
    When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.
    connectionId String
    The ID of the connection to enable for the organization.
    isSignupEnabled Boolean
    Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
    name String
    The name of the enabled connection.
    organizationId String
    The ID of the organization to enable the connection for.
    showAsButton Boolean
    Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
    strategy String
    The strategy of the enabled connection.

    Import

    This resource can be imported by specifying the

    organization ID and connection ID separated by “::” (note the double colon)

    ::

    Example:

    $ pulumi import auth0:index/organizationConnection:OrganizationConnection my_org_conn "org_XXXXX::con_XXXXX"
    

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

    Package Details

    Repository
    Auth0 pulumi/pulumi-auth0
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the auth0 Terraform Provider.
    auth0 logo
    Auth0 v3.4.0 published on Wednesday, Jun 19, 2024 by Pulumi