1. Packages
  2. Auth0
  3. API Docs
  4. OrganizationConnection
Auth0 v3.3.1 published on Thursday, Mar 14, 2024 by Pulumi

auth0.OrganizationConnection

Explore with Pulumi AI

auth0 logo
Auth0 v3.3.1 published on Thursday, Mar 14, 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("myConnection", {strategy: "auth0"});
    const myOrganization = new auth0.Organization("myOrganization", {displayName: "My Organization"});
    const myOrgConn = new auth0.OrganizationConnection("myOrgConn", {
        organizationId: myOrganization.id,
        connectionId: myConnection.id,
        assignMembershipOnLogin: true,
    });
    
    import pulumi
    import pulumi_auth0 as auth0
    
    my_connection = auth0.Connection("myConnection", strategy="auth0")
    my_organization = auth0.Organization("myOrganization", display_name="My Organization")
    my_org_conn = auth0.OrganizationConnection("myOrgConn",
        organization_id=my_organization.id,
        connection_id=my_connection.id,
        assign_membership_on_login=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, "myConnection", &auth0.ConnectionArgs{
    			Strategy: pulumi.String("auth0"),
    		})
    		if err != nil {
    			return err
    		}
    		myOrganization, err := auth0.NewOrganization(ctx, "myOrganization", &auth0.OrganizationArgs{
    			DisplayName: pulumi.String("My Organization"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = auth0.NewOrganizationConnection(ctx, "myOrgConn", &auth0.OrganizationConnectionArgs{
    			OrganizationId:          myOrganization.ID(),
    			ConnectionId:            myConnection.ID(),
    			AssignMembershipOnLogin: 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("myConnection", new()
        {
            Strategy = "auth0",
        });
    
        var myOrganization = new Auth0.Organization("myOrganization", new()
        {
            DisplayName = "My Organization",
        });
    
        var myOrgConn = new Auth0.OrganizationConnection("myOrgConn", new()
        {
            OrganizationId = myOrganization.Id,
            ConnectionId = myConnection.Id,
            AssignMembershipOnLogin = 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()        
                .strategy("auth0")
                .build());
    
            var myOrganization = new Organization("myOrganization", OrganizationArgs.builder()        
                .displayName("My Organization")
                .build());
    
            var myOrgConn = new OrganizationConnection("myOrgConn", OrganizationConnectionArgs.builder()        
                .organizationId(myOrganization.id())
                .connectionId(myConnection.id())
                .assignMembershipOnLogin(true)
                .build());
    
        }
    }
    
    resources:
      myConnection:
        type: auth0:Connection
        properties:
          strategy: auth0
      myOrganization:
        type: auth0:Organization
        properties:
          displayName: My Organization
      myOrgConn:
        type: auth0:OrganizationConnection
        properties:
          organizationId: ${myOrganization.id}
          connectionId: ${myConnection.id}
          assignMembershipOnLogin: true
    

    Create OrganizationConnection Resource

    new OrganizationConnection(name: string, args: OrganizationConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def OrganizationConnection(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               assign_membership_on_login: Optional[bool] = None,
                               connection_id: Optional[str] = None,
                               organization_id: Optional[str] = None)
    @overload
    def OrganizationConnection(resource_name: str,
                               args: OrganizationConnectionArgs,
                               opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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.
    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.
    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.
    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.
    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.
    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.

    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,
            name: Optional[str] = None,
            organization_id: Optional[str] = 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.
    Name string
    The name of the enabled connection.
    OrganizationId string
    The ID of the organization to enable the connection for.
    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.
    Name string
    The name of the enabled connection.
    OrganizationId string
    The ID of the organization to enable the connection for.
    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.
    name String
    The name of the enabled connection.
    organizationId String
    The ID of the organization to enable the connection for.
    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.
    name string
    The name of the enabled connection.
    organizationId string
    The ID of the organization to enable the connection for.
    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.
    name str
    The name of the enabled connection.
    organization_id str
    The ID of the organization to enable the connection for.
    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.
    name String
    The name of the enabled connection.
    organizationId String
    The ID of the organization to enable the connection for.
    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"
    

    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.3.1 published on Thursday, Mar 14, 2024 by Pulumi