auth0.OrganizationConnection
Explore with Pulumi AI
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The OrganizationConnection resource accepts the following input properties:
- Connection
Id string - The ID of the connection to enable for the organization.
- Organization
Id string - The ID of the organization to enable the connection for.
- Assign
Membership boolOn Login - When
true
, all users that log in with this connection will be automatically granted membership in the organization. Whenfalse
, users must be granted membership in the organization before logging in with this connection. - Is
Signup boolEnabled - Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note:
is_signup_enabled
can only betrue
ifassign_membership_on_login
istrue
. - bool
- Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
- Connection
Id string - The ID of the connection to enable for the organization.
- Organization
Id string - The ID of the organization to enable the connection for.
- Assign
Membership boolOn Login - When
true
, all users that log in with this connection will be automatically granted membership in the organization. Whenfalse
, users must be granted membership in the organization before logging in with this connection. - Is
Signup boolEnabled - Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note:
is_signup_enabled
can only betrue
ifassign_membership_on_login
istrue
. - bool
- Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
- connection
Id String - The ID of the connection to enable for the organization.
- organization
Id String - The ID of the organization to enable the connection for.
- assign
Membership BooleanOn Login - When
true
, all users that log in with this connection will be automatically granted membership in the organization. Whenfalse
, users must be granted membership in the organization before logging in with this connection. - is
Signup BooleanEnabled - Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note:
is_signup_enabled
can only betrue
ifassign_membership_on_login
istrue
. - Boolean
- Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
- connection
Id string - The ID of the connection to enable for the organization.
- organization
Id string - The ID of the organization to enable the connection for.
- assign
Membership booleanOn Login - When
true
, all users that log in with this connection will be automatically granted membership in the organization. Whenfalse
, users must be granted membership in the organization before logging in with this connection. - is
Signup booleanEnabled - Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note:
is_signup_enabled
can only betrue
ifassign_membership_on_login
istrue
. - 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_ boolon_ login - When
true
, all users that log in with this connection will be automatically granted membership in the organization. Whenfalse
, users must be granted membership in the organization before logging in with this connection. - is_
signup_ boolenabled - Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note:
is_signup_enabled
can only betrue
ifassign_membership_on_login
istrue
. - bool
- Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
- connection
Id String - The ID of the connection to enable for the organization.
- organization
Id String - The ID of the organization to enable the connection for.
- assign
Membership BooleanOn Login - When
true
, all users that log in with this connection will be automatically granted membership in the organization. Whenfalse
, users must be granted membership in the organization before logging in with this connection. - is
Signup BooleanEnabled - Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note:
is_signup_enabled
can only betrue
ifassign_membership_on_login
istrue
. - 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:
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.
- Assign
Membership boolOn Login - When
true
, all users that log in with this connection will be automatically granted membership in the organization. Whenfalse
, users must be granted membership in the organization before logging in with this connection. - Connection
Id string - The ID of the connection to enable for the organization.
- Is
Signup boolEnabled - Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note:
is_signup_enabled
can only betrue
ifassign_membership_on_login
istrue
. - Name string
- The name of the enabled connection.
- Organization
Id string - The ID of the organization to enable the connection for.
- 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.
- Assign
Membership boolOn Login - When
true
, all users that log in with this connection will be automatically granted membership in the organization. Whenfalse
, users must be granted membership in the organization before logging in with this connection. - Connection
Id string - The ID of the connection to enable for the organization.
- Is
Signup boolEnabled - Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note:
is_signup_enabled
can only betrue
ifassign_membership_on_login
istrue
. - Name string
- The name of the enabled connection.
- Organization
Id string - The ID of the organization to enable the connection for.
- 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.
- assign
Membership BooleanOn Login - When
true
, all users that log in with this connection will be automatically granted membership in the organization. Whenfalse
, users must be granted membership in the organization before logging in with this connection. - connection
Id String - The ID of the connection to enable for the organization.
- is
Signup BooleanEnabled - Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note:
is_signup_enabled
can only betrue
ifassign_membership_on_login
istrue
. - name String
- The name of the enabled connection.
- organization
Id String - The ID of the organization to enable the connection for.
- 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 booleanOn Login - When
true
, all users that log in with this connection will be automatically granted membership in the organization. Whenfalse
, users must be granted membership in the organization before logging in with this connection. - connection
Id string - The ID of the connection to enable for the organization.
- is
Signup booleanEnabled - Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note:
is_signup_enabled
can only betrue
ifassign_membership_on_login
istrue
. - name string
- The name of the enabled connection.
- organization
Id string - The ID of the organization to enable the connection for.
- 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_ boolon_ login - When
true
, all users that log in with this connection will be automatically granted membership in the organization. Whenfalse
, 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_ boolenabled - Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note:
is_signup_enabled
can only betrue
ifassign_membership_on_login
istrue
. - name str
- The name of the enabled connection.
- organization_
id str - The ID of the organization to enable the connection for.
- 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.
- assign
Membership BooleanOn Login - When
true
, all users that log in with this connection will be automatically granted membership in the organization. Whenfalse
, users must be granted membership in the organization before logging in with this connection. - connection
Id String - The ID of the connection to enable for the organization.
- is
Signup BooleanEnabled - Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note:
is_signup_enabled
can only betrue
ifassign_membership_on_login
istrue
. - name String
- The name of the enabled connection.
- organization
Id String - The ID of the organization to enable the connection for.
- 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.