1. Packages
  2. Auth0 Provider
  3. API Docs
  4. OrganizationConnections
Auth0 v3.8.3 published on Wednesday, Nov 6, 2024 by Pulumi

auth0.OrganizationConnections

Explore with Pulumi AI

auth0 logo
Auth0 v3.8.3 published on Wednesday, Nov 6, 2024 by Pulumi

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

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as auth0 from "@pulumi/auth0";
    
    const myConnection_1 = new auth0.Connection("my_connection-1", {
        name: "My Connection 1",
        strategy: "auth0",
    });
    const myConnection_2 = new auth0.Connection("my_connection-2", {
        name: "My Connection 2",
        strategy: "auth0",
    });
    const myOrganization = new auth0.Organization("my_organization", {
        name: "my-organization",
        displayName: "My Organization",
    });
    const one_to_many = new auth0.OrganizationConnections("one-to-many", {
        organizationId: myOrganization.id,
        enabledConnections: [
            {
                connectionId: myConnection_1.id,
                assignMembershipOnLogin: true,
                isSignupEnabled: false,
                showAsButton: true,
            },
            {
                connectionId: myConnection_2.id,
                assignMembershipOnLogin: true,
                isSignupEnabled: false,
                showAsButton: true,
            },
        ],
    });
    
    import pulumi
    import pulumi_auth0 as auth0
    
    my_connection_1 = auth0.Connection("my_connection-1",
        name="My Connection 1",
        strategy="auth0")
    my_connection_2 = auth0.Connection("my_connection-2",
        name="My Connection 2",
        strategy="auth0")
    my_organization = auth0.Organization("my_organization",
        name="my-organization",
        display_name="My Organization")
    one_to_many = auth0.OrganizationConnections("one-to-many",
        organization_id=my_organization.id,
        enabled_connections=[
            {
                "connection_id": my_connection_1.id,
                "assign_membership_on_login": True,
                "is_signup_enabled": False,
                "show_as_button": True,
            },
            {
                "connection_id": my_connection_2.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 {
    		_, err := auth0.NewConnection(ctx, "my_connection-1", &auth0.ConnectionArgs{
    			Name:     pulumi.String("My Connection 1"),
    			Strategy: pulumi.String("auth0"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = auth0.NewConnection(ctx, "my_connection-2", &auth0.ConnectionArgs{
    			Name:     pulumi.String("My Connection 2"),
    			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.NewOrganizationConnections(ctx, "one-to-many", &auth0.OrganizationConnectionsArgs{
    			OrganizationId: myOrganization.ID(),
    			EnabledConnections: auth0.OrganizationConnectionsEnabledConnectionArray{
    				&auth0.OrganizationConnectionsEnabledConnectionArgs{
    					ConnectionId:            myConnection_1.ID(),
    					AssignMembershipOnLogin: pulumi.Bool(true),
    					IsSignupEnabled:         pulumi.Bool(false),
    					ShowAsButton:            pulumi.Bool(true),
    				},
    				&auth0.OrganizationConnectionsEnabledConnectionArgs{
    					ConnectionId:            myConnection_2.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_1 = new Auth0.Connection("my_connection-1", new()
        {
            Name = "My Connection 1",
            Strategy = "auth0",
        });
    
        var myConnection_2 = new Auth0.Connection("my_connection-2", new()
        {
            Name = "My Connection 2",
            Strategy = "auth0",
        });
    
        var myOrganization = new Auth0.Organization("my_organization", new()
        {
            Name = "my-organization",
            DisplayName = "My Organization",
        });
    
        var one_to_many = new Auth0.OrganizationConnections("one-to-many", new()
        {
            OrganizationId = myOrganization.Id,
            EnabledConnections = new[]
            {
                new Auth0.Inputs.OrganizationConnectionsEnabledConnectionArgs
                {
                    ConnectionId = myConnection_1.Id,
                    AssignMembershipOnLogin = true,
                    IsSignupEnabled = false,
                    ShowAsButton = true,
                },
                new Auth0.Inputs.OrganizationConnectionsEnabledConnectionArgs
                {
                    ConnectionId = myConnection_2.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.OrganizationConnections;
    import com.pulumi.auth0.OrganizationConnectionsArgs;
    import com.pulumi.auth0.inputs.OrganizationConnectionsEnabledConnectionArgs;
    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_1 = new Connection("myConnection-1", ConnectionArgs.builder()
                .name("My Connection 1")
                .strategy("auth0")
                .build());
    
            var myConnection_2 = new Connection("myConnection-2", ConnectionArgs.builder()
                .name("My Connection 2")
                .strategy("auth0")
                .build());
    
            var myOrganization = new Organization("myOrganization", OrganizationArgs.builder()
                .name("my-organization")
                .displayName("My Organization")
                .build());
    
            var one_to_many = new OrganizationConnections("one-to-many", OrganizationConnectionsArgs.builder()
                .organizationId(myOrganization.id())
                .enabledConnections(            
                    OrganizationConnectionsEnabledConnectionArgs.builder()
                        .connectionId(myConnection_1.id())
                        .assignMembershipOnLogin(true)
                        .isSignupEnabled(false)
                        .showAsButton(true)
                        .build(),
                    OrganizationConnectionsEnabledConnectionArgs.builder()
                        .connectionId(myConnection_2.id())
                        .assignMembershipOnLogin(true)
                        .isSignupEnabled(false)
                        .showAsButton(true)
                        .build())
                .build());
    
        }
    }
    
    resources:
      myConnection-1:
        type: auth0:Connection
        name: my_connection-1
        properties:
          name: My Connection 1
          strategy: auth0
      myConnection-2:
        type: auth0:Connection
        name: my_connection-2
        properties:
          name: My Connection 2
          strategy: auth0
      myOrganization:
        type: auth0:Organization
        name: my_organization
        properties:
          name: my-organization
          displayName: My Organization
      one-to-many:
        type: auth0:OrganizationConnections
        properties:
          organizationId: ${myOrganization.id}
          enabledConnections:
            - connectionId: ${["myConnection-1"].id}
              assignMembershipOnLogin: true
              isSignupEnabled: false
              showAsButton: true
            - connectionId: ${["myConnection-2"].id}
              assignMembershipOnLogin: true
              isSignupEnabled: false
              showAsButton: true
    

    Create OrganizationConnections Resource

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

    Constructor syntax

    new OrganizationConnections(name: string, args: OrganizationConnectionsArgs, opts?: CustomResourceOptions);
    @overload
    def OrganizationConnections(resource_name: str,
                                args: OrganizationConnectionsArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def OrganizationConnections(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                enabled_connections: Optional[Sequence[OrganizationConnectionsEnabledConnectionArgs]] = None,
                                organization_id: Optional[str] = None)
    func NewOrganizationConnections(ctx *Context, name string, args OrganizationConnectionsArgs, opts ...ResourceOption) (*OrganizationConnections, error)
    public OrganizationConnections(string name, OrganizationConnectionsArgs args, CustomResourceOptions? opts = null)
    public OrganizationConnections(String name, OrganizationConnectionsArgs args)
    public OrganizationConnections(String name, OrganizationConnectionsArgs args, CustomResourceOptions options)
    
    type: auth0:OrganizationConnections
    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 OrganizationConnectionsArgs
    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 OrganizationConnectionsArgs
    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 OrganizationConnectionsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OrganizationConnectionsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OrganizationConnectionsArgs
    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 organizationConnectionsResource = new Auth0.OrganizationConnections("organizationConnectionsResource", new()
    {
        EnabledConnections = new[]
        {
            new Auth0.Inputs.OrganizationConnectionsEnabledConnectionArgs
            {
                ConnectionId = "string",
                AssignMembershipOnLogin = false,
                IsSignupEnabled = false,
                ShowAsButton = false,
            },
        },
        OrganizationId = "string",
    });
    
    example, err := auth0.NewOrganizationConnections(ctx, "organizationConnectionsResource", &auth0.OrganizationConnectionsArgs{
    	EnabledConnections: auth0.OrganizationConnectionsEnabledConnectionArray{
    		&auth0.OrganizationConnectionsEnabledConnectionArgs{
    			ConnectionId:            pulumi.String("string"),
    			AssignMembershipOnLogin: pulumi.Bool(false),
    			IsSignupEnabled:         pulumi.Bool(false),
    			ShowAsButton:            pulumi.Bool(false),
    		},
    	},
    	OrganizationId: pulumi.String("string"),
    })
    
    var organizationConnectionsResource = new OrganizationConnections("organizationConnectionsResource", OrganizationConnectionsArgs.builder()
        .enabledConnections(OrganizationConnectionsEnabledConnectionArgs.builder()
            .connectionId("string")
            .assignMembershipOnLogin(false)
            .isSignupEnabled(false)
            .showAsButton(false)
            .build())
        .organizationId("string")
        .build());
    
    organization_connections_resource = auth0.OrganizationConnections("organizationConnectionsResource",
        enabled_connections=[{
            "connection_id": "string",
            "assign_membership_on_login": False,
            "is_signup_enabled": False,
            "show_as_button": False,
        }],
        organization_id="string")
    
    const organizationConnectionsResource = new auth0.OrganizationConnections("organizationConnectionsResource", {
        enabledConnections: [{
            connectionId: "string",
            assignMembershipOnLogin: false,
            isSignupEnabled: false,
            showAsButton: false,
        }],
        organizationId: "string",
    });
    
    type: auth0:OrganizationConnections
    properties:
        enabledConnections:
            - assignMembershipOnLogin: false
              connectionId: string
              isSignupEnabled: false
              showAsButton: false
        organizationId: string
    

    OrganizationConnections Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The OrganizationConnections resource accepts the following input properties:

    EnabledConnections List<OrganizationConnectionsEnabledConnection>
    Connections that are enabled for the organization.
    OrganizationId string
    ID of the organization on which to enable the connections.
    EnabledConnections []OrganizationConnectionsEnabledConnectionArgs
    Connections that are enabled for the organization.
    OrganizationId string
    ID of the organization on which to enable the connections.
    enabledConnections List<OrganizationConnectionsEnabledConnection>
    Connections that are enabled for the organization.
    organizationId String
    ID of the organization on which to enable the connections.
    enabledConnections OrganizationConnectionsEnabledConnection[]
    Connections that are enabled for the organization.
    organizationId string
    ID of the organization on which to enable the connections.
    enabled_connections Sequence[OrganizationConnectionsEnabledConnectionArgs]
    Connections that are enabled for the organization.
    organization_id str
    ID of the organization on which to enable the connections.
    enabledConnections List<Property Map>
    Connections that are enabled for the organization.
    organizationId String
    ID of the organization on which to enable the connections.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the OrganizationConnections 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 OrganizationConnections Resource

    Get an existing OrganizationConnections 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?: OrganizationConnectionsState, opts?: CustomResourceOptions): OrganizationConnections
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enabled_connections: Optional[Sequence[OrganizationConnectionsEnabledConnectionArgs]] = None,
            organization_id: Optional[str] = None) -> OrganizationConnections
    func GetOrganizationConnections(ctx *Context, name string, id IDInput, state *OrganizationConnectionsState, opts ...ResourceOption) (*OrganizationConnections, error)
    public static OrganizationConnections Get(string name, Input<string> id, OrganizationConnectionsState? state, CustomResourceOptions? opts = null)
    public static OrganizationConnections get(String name, Output<String> id, OrganizationConnectionsState 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:
    EnabledConnections List<OrganizationConnectionsEnabledConnection>
    Connections that are enabled for the organization.
    OrganizationId string
    ID of the organization on which to enable the connections.
    EnabledConnections []OrganizationConnectionsEnabledConnectionArgs
    Connections that are enabled for the organization.
    OrganizationId string
    ID of the organization on which to enable the connections.
    enabledConnections List<OrganizationConnectionsEnabledConnection>
    Connections that are enabled for the organization.
    organizationId String
    ID of the organization on which to enable the connections.
    enabledConnections OrganizationConnectionsEnabledConnection[]
    Connections that are enabled for the organization.
    organizationId string
    ID of the organization on which to enable the connections.
    enabled_connections Sequence[OrganizationConnectionsEnabledConnectionArgs]
    Connections that are enabled for the organization.
    organization_id str
    ID of the organization on which to enable the connections.
    enabledConnections List<Property Map>
    Connections that are enabled for the organization.
    organizationId String
    ID of the organization on which to enable the connections.

    Supporting Types

    OrganizationConnectionsEnabledConnection, OrganizationConnectionsEnabledConnectionArgs

    ConnectionId string
    The ID of the connection to enable for the organization.
    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.
    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.
    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.
    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.
    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.
    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.

    Import

    This resource can be imported by specifying the organization ID.

    Example:

    $ pulumi import auth0:index/organizationConnections:OrganizationConnections my_org_conns "org_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.8.3 published on Wednesday, Nov 6, 2024 by Pulumi