1. Packages
  2. Authentik Provider
  3. API Docs
  4. ProviderLdap
authentik 2025.2.0 published on Monday, Mar 24, 2025 by goauthentik

authentik.ProviderLdap

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as authentik from "@pulumi/authentik";

const default_authentication_flow = authentik.getFlow({
    slug: "default-authentication-flow",
});
const nameProviderLdap = new authentik.ProviderLdap("nameProviderLdap", {
    baseDn: "dc=ldap,dc=goauthentik,dc=io",
    bindFlow: default_authentication_flow.then(default_authentication_flow => default_authentication_flow.id),
});
const nameApplication = new authentik.Application("nameApplication", {
    slug: "ldap-app",
    protocolProvider: nameProviderLdap.providerLdapId,
});
Copy
import pulumi
import pulumi_authentik as authentik

default_authentication_flow = authentik.get_flow(slug="default-authentication-flow")
name_provider_ldap = authentik.ProviderLdap("nameProviderLdap",
    base_dn="dc=ldap,dc=goauthentik,dc=io",
    bind_flow=default_authentication_flow.id)
name_application = authentik.Application("nameApplication",
    slug="ldap-app",
    protocol_provider=name_provider_ldap.provider_ldap_id)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/authentik/v2025/authentik"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		default_authentication_flow, err := authentik.LookupFlow(ctx, &authentik.LookupFlowArgs{
			Slug: pulumi.StringRef("default-authentication-flow"),
		}, nil)
		if err != nil {
			return err
		}
		nameProviderLdap, err := authentik.NewProviderLdap(ctx, "nameProviderLdap", &authentik.ProviderLdapArgs{
			BaseDn:   pulumi.String("dc=ldap,dc=goauthentik,dc=io"),
			BindFlow: pulumi.String(default_authentication_flow.Id),
		})
		if err != nil {
			return err
		}
		_, err = authentik.NewApplication(ctx, "nameApplication", &authentik.ApplicationArgs{
			Slug:             pulumi.String("ldap-app"),
			ProtocolProvider: nameProviderLdap.ProviderLdapId,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Authentik = Pulumi.Authentik;

return await Deployment.RunAsync(() => 
{
    var default_authentication_flow = Authentik.GetFlow.Invoke(new()
    {
        Slug = "default-authentication-flow",
    });

    var nameProviderLdap = new Authentik.ProviderLdap("nameProviderLdap", new()
    {
        BaseDn = "dc=ldap,dc=goauthentik,dc=io",
        BindFlow = default_authentication_flow.Apply(default_authentication_flow => default_authentication_flow.Apply(getFlowResult => getFlowResult.Id)),
    });

    var nameApplication = new Authentik.Application("nameApplication", new()
    {
        Slug = "ldap-app",
        ProtocolProvider = nameProviderLdap.ProviderLdapId,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.authentik.AuthentikFunctions;
import com.pulumi.authentik.inputs.GetFlowArgs;
import com.pulumi.authentik.ProviderLdap;
import com.pulumi.authentik.ProviderLdapArgs;
import com.pulumi.authentik.Application;
import com.pulumi.authentik.ApplicationArgs;
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) {
        final var default-authentication-flow = AuthentikFunctions.getFlow(GetFlowArgs.builder()
            .slug("default-authentication-flow")
            .build());

        var nameProviderLdap = new ProviderLdap("nameProviderLdap", ProviderLdapArgs.builder()
            .baseDn("dc=ldap,dc=goauthentik,dc=io")
            .bindFlow(default_authentication_flow.id())
            .build());

        var nameApplication = new Application("nameApplication", ApplicationArgs.builder()
            .slug("ldap-app")
            .protocolProvider(nameProviderLdap.providerLdapId())
            .build());

    }
}
Copy
resources:
  nameProviderLdap:
    type: authentik:ProviderLdap
    properties:
      baseDn: dc=ldap,dc=goauthentik,dc=io
      bindFlow: ${["default-authentication-flow"].id}
  nameApplication:
    type: authentik:Application
    properties:
      slug: ldap-app
      protocolProvider: ${nameProviderLdap.providerLdapId}
variables:
  default-authentication-flow:
    fn::invoke:
      function: authentik:getFlow
      arguments:
        slug: default-authentication-flow
Copy

Create ProviderLdap Resource

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

Constructor syntax

new ProviderLdap(name: string, args: ProviderLdapArgs, opts?: CustomResourceOptions);
@overload
def ProviderLdap(resource_name: str,
                 args: ProviderLdapArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def ProviderLdap(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 base_dn: Optional[str] = None,
                 bind_flow: Optional[str] = None,
                 unbind_flow: Optional[str] = None,
                 bind_mode: Optional[str] = None,
                 certificate: Optional[str] = None,
                 gid_start_number: Optional[float] = None,
                 mfa_support: Optional[bool] = None,
                 name: Optional[str] = None,
                 provider_ldap_id: Optional[str] = None,
                 search_mode: Optional[str] = None,
                 tls_server_name: Optional[str] = None,
                 uid_start_number: Optional[float] = None)
func NewProviderLdap(ctx *Context, name string, args ProviderLdapArgs, opts ...ResourceOption) (*ProviderLdap, error)
public ProviderLdap(string name, ProviderLdapArgs args, CustomResourceOptions? opts = null)
public ProviderLdap(String name, ProviderLdapArgs args)
public ProviderLdap(String name, ProviderLdapArgs args, CustomResourceOptions options)
type: authentik:ProviderLdap
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ProviderLdapArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ProviderLdapArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ProviderLdapArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ProviderLdapArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ProviderLdapArgs
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 providerLdapResource = new Authentik.ProviderLdap("providerLdapResource", new()
{
    BaseDn = "string",
    BindFlow = "string",
    UnbindFlow = "string",
    BindMode = "string",
    Certificate = "string",
    GidStartNumber = 0,
    MfaSupport = false,
    Name = "string",
    ProviderLdapId = "string",
    SearchMode = "string",
    TlsServerName = "string",
    UidStartNumber = 0,
});
Copy
example, err := authentik.NewProviderLdap(ctx, "providerLdapResource", &authentik.ProviderLdapArgs{
	BaseDn:         pulumi.String("string"),
	BindFlow:       pulumi.String("string"),
	UnbindFlow:     pulumi.String("string"),
	BindMode:       pulumi.String("string"),
	Certificate:    pulumi.String("string"),
	GidStartNumber: pulumi.Float64(0),
	MfaSupport:     pulumi.Bool(false),
	Name:           pulumi.String("string"),
	ProviderLdapId: pulumi.String("string"),
	SearchMode:     pulumi.String("string"),
	TlsServerName:  pulumi.String("string"),
	UidStartNumber: pulumi.Float64(0),
})
Copy
var providerLdapResource = new ProviderLdap("providerLdapResource", ProviderLdapArgs.builder()
    .baseDn("string")
    .bindFlow("string")
    .unbindFlow("string")
    .bindMode("string")
    .certificate("string")
    .gidStartNumber(0)
    .mfaSupport(false)
    .name("string")
    .providerLdapId("string")
    .searchMode("string")
    .tlsServerName("string")
    .uidStartNumber(0)
    .build());
Copy
provider_ldap_resource = authentik.ProviderLdap("providerLdapResource",
    base_dn="string",
    bind_flow="string",
    unbind_flow="string",
    bind_mode="string",
    certificate="string",
    gid_start_number=0,
    mfa_support=False,
    name="string",
    provider_ldap_id="string",
    search_mode="string",
    tls_server_name="string",
    uid_start_number=0)
Copy
const providerLdapResource = new authentik.ProviderLdap("providerLdapResource", {
    baseDn: "string",
    bindFlow: "string",
    unbindFlow: "string",
    bindMode: "string",
    certificate: "string",
    gidStartNumber: 0,
    mfaSupport: false,
    name: "string",
    providerLdapId: "string",
    searchMode: "string",
    tlsServerName: "string",
    uidStartNumber: 0,
});
Copy
type: authentik:ProviderLdap
properties:
    baseDn: string
    bindFlow: string
    bindMode: string
    certificate: string
    gidStartNumber: 0
    mfaSupport: false
    name: string
    providerLdapId: string
    searchMode: string
    tlsServerName: string
    uidStartNumber: 0
    unbindFlow: string
Copy

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

BaseDn This property is required. string
BindFlow This property is required. string
UnbindFlow This property is required. string
BindMode string
Defaults to direct.
Certificate string
GidStartNumber double
Defaults to 4000.
MfaSupport bool
Defaults to true.
Name string
ProviderLdapId string
The ID of this resource.
SearchMode string
Defaults to direct.
TlsServerName string
UidStartNumber double
Defaults to 2000.
BaseDn This property is required. string
BindFlow This property is required. string
UnbindFlow This property is required. string
BindMode string
Defaults to direct.
Certificate string
GidStartNumber float64
Defaults to 4000.
MfaSupport bool
Defaults to true.
Name string
ProviderLdapId string
The ID of this resource.
SearchMode string
Defaults to direct.
TlsServerName string
UidStartNumber float64
Defaults to 2000.
baseDn This property is required. String
bindFlow This property is required. String
unbindFlow This property is required. String
bindMode String
Defaults to direct.
certificate String
gidStartNumber Double
Defaults to 4000.
mfaSupport Boolean
Defaults to true.
name String
providerLdapId String
The ID of this resource.
searchMode String
Defaults to direct.
tlsServerName String
uidStartNumber Double
Defaults to 2000.
baseDn This property is required. string
bindFlow This property is required. string
unbindFlow This property is required. string
bindMode string
Defaults to direct.
certificate string
gidStartNumber number
Defaults to 4000.
mfaSupport boolean
Defaults to true.
name string
providerLdapId string
The ID of this resource.
searchMode string
Defaults to direct.
tlsServerName string
uidStartNumber number
Defaults to 2000.
base_dn This property is required. str
bind_flow This property is required. str
unbind_flow This property is required. str
bind_mode str
Defaults to direct.
certificate str
gid_start_number float
Defaults to 4000.
mfa_support bool
Defaults to true.
name str
provider_ldap_id str
The ID of this resource.
search_mode str
Defaults to direct.
tls_server_name str
uid_start_number float
Defaults to 2000.
baseDn This property is required. String
bindFlow This property is required. String
unbindFlow This property is required. String
bindMode String
Defaults to direct.
certificate String
gidStartNumber Number
Defaults to 4000.
mfaSupport Boolean
Defaults to true.
name String
providerLdapId String
The ID of this resource.
searchMode String
Defaults to direct.
tlsServerName String
uidStartNumber Number
Defaults to 2000.

Outputs

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

Get an existing ProviderLdap 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?: ProviderLdapState, opts?: CustomResourceOptions): ProviderLdap
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        base_dn: Optional[str] = None,
        bind_flow: Optional[str] = None,
        bind_mode: Optional[str] = None,
        certificate: Optional[str] = None,
        gid_start_number: Optional[float] = None,
        mfa_support: Optional[bool] = None,
        name: Optional[str] = None,
        provider_ldap_id: Optional[str] = None,
        search_mode: Optional[str] = None,
        tls_server_name: Optional[str] = None,
        uid_start_number: Optional[float] = None,
        unbind_flow: Optional[str] = None) -> ProviderLdap
func GetProviderLdap(ctx *Context, name string, id IDInput, state *ProviderLdapState, opts ...ResourceOption) (*ProviderLdap, error)
public static ProviderLdap Get(string name, Input<string> id, ProviderLdapState? state, CustomResourceOptions? opts = null)
public static ProviderLdap get(String name, Output<String> id, ProviderLdapState state, CustomResourceOptions options)
resources:  _:    type: authentik:ProviderLdap    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
BaseDn string
BindFlow string
BindMode string
Defaults to direct.
Certificate string
GidStartNumber double
Defaults to 4000.
MfaSupport bool
Defaults to true.
Name string
ProviderLdapId string
The ID of this resource.
SearchMode string
Defaults to direct.
TlsServerName string
UidStartNumber double
Defaults to 2000.
UnbindFlow string
BaseDn string
BindFlow string
BindMode string
Defaults to direct.
Certificate string
GidStartNumber float64
Defaults to 4000.
MfaSupport bool
Defaults to true.
Name string
ProviderLdapId string
The ID of this resource.
SearchMode string
Defaults to direct.
TlsServerName string
UidStartNumber float64
Defaults to 2000.
UnbindFlow string
baseDn String
bindFlow String
bindMode String
Defaults to direct.
certificate String
gidStartNumber Double
Defaults to 4000.
mfaSupport Boolean
Defaults to true.
name String
providerLdapId String
The ID of this resource.
searchMode String
Defaults to direct.
tlsServerName String
uidStartNumber Double
Defaults to 2000.
unbindFlow String
baseDn string
bindFlow string
bindMode string
Defaults to direct.
certificate string
gidStartNumber number
Defaults to 4000.
mfaSupport boolean
Defaults to true.
name string
providerLdapId string
The ID of this resource.
searchMode string
Defaults to direct.
tlsServerName string
uidStartNumber number
Defaults to 2000.
unbindFlow string
base_dn str
bind_flow str
bind_mode str
Defaults to direct.
certificate str
gid_start_number float
Defaults to 4000.
mfa_support bool
Defaults to true.
name str
provider_ldap_id str
The ID of this resource.
search_mode str
Defaults to direct.
tls_server_name str
uid_start_number float
Defaults to 2000.
unbind_flow str
baseDn String
bindFlow String
bindMode String
Defaults to direct.
certificate String
gidStartNumber Number
Defaults to 4000.
mfaSupport Boolean
Defaults to true.
name String
providerLdapId String
The ID of this resource.
searchMode String
Defaults to direct.
tlsServerName String
uidStartNumber Number
Defaults to 2000.
unbindFlow String

Package Details

Repository
authentik goauthentik/terraform-provider-authentik
License
Notes
This Pulumi package is based on the authentik Terraform Provider.