1. Packages
  2. Packages
  3. Akeyless Provider
  4. API Docs
  5. TargetLdap
Viewing docs for akeyless 2.0.1
published on Monday, Apr 27, 2026 by akeyless-community
Viewing docs for akeyless 2.0.1
published on Monday, Apr 27, 2026 by akeyless-community

    LDAP Target resource

    Create TargetLdap Resource

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

    Constructor syntax

    new TargetLdap(name: string, args: TargetLdapArgs, opts?: CustomResourceOptions);
    @overload
    def TargetLdap(resource_name: str,
                   args: TargetLdapArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def TargetLdap(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   bind_dn: Optional[str] = None,
                   bind_dn_password: Optional[str] = None,
                   ldap_url: Optional[str] = None,
                   description: Optional[str] = None,
                   keep_prev_version: Optional[str] = None,
                   key: Optional[str] = None,
                   ldap_ca_cert: Optional[str] = None,
                   max_versions: Optional[str] = None,
                   name: Optional[str] = None,
                   server_type: Optional[str] = None,
                   target_ldap_id: Optional[str] = None,
                   token_expiration: Optional[str] = None)
    func NewTargetLdap(ctx *Context, name string, args TargetLdapArgs, opts ...ResourceOption) (*TargetLdap, error)
    public TargetLdap(string name, TargetLdapArgs args, CustomResourceOptions? opts = null)
    public TargetLdap(String name, TargetLdapArgs args)
    public TargetLdap(String name, TargetLdapArgs args, CustomResourceOptions options)
    
    type: akeyless:TargetLdap
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "akeyless_targetldap" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args TargetLdapArgs
    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 TargetLdapArgs
    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 TargetLdapArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TargetLdapArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TargetLdapArgs
    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 targetLdapResource = new Akeyless.TargetLdap("targetLdapResource", new()
    {
        BindDn = "string",
        BindDnPassword = "string",
        LdapUrl = "string",
        Description = "string",
        KeepPrevVersion = "string",
        Key = "string",
        LdapCaCert = "string",
        MaxVersions = "string",
        Name = "string",
        ServerType = "string",
        TargetLdapId = "string",
        TokenExpiration = "string",
    });
    
    example, err := akeyless.NewTargetLdap(ctx, "targetLdapResource", &akeyless.TargetLdapArgs{
    	BindDn:          pulumi.String("string"),
    	BindDnPassword:  pulumi.String("string"),
    	LdapUrl:         pulumi.String("string"),
    	Description:     pulumi.String("string"),
    	KeepPrevVersion: pulumi.String("string"),
    	Key:             pulumi.String("string"),
    	LdapCaCert:      pulumi.String("string"),
    	MaxVersions:     pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	ServerType:      pulumi.String("string"),
    	TargetLdapId:    pulumi.String("string"),
    	TokenExpiration: pulumi.String("string"),
    })
    
    resource "akeyless_targetldap" "targetLdapResource" {
      bind_dn           = "string"
      bind_dn_password  = "string"
      ldap_url          = "string"
      description       = "string"
      keep_prev_version = "string"
      key               = "string"
      ldap_ca_cert      = "string"
      max_versions      = "string"
      name              = "string"
      server_type       = "string"
      target_ldap_id    = "string"
      token_expiration  = "string"
    }
    
    var targetLdapResource = new TargetLdap("targetLdapResource", TargetLdapArgs.builder()
        .bindDn("string")
        .bindDnPassword("string")
        .ldapUrl("string")
        .description("string")
        .keepPrevVersion("string")
        .key("string")
        .ldapCaCert("string")
        .maxVersions("string")
        .name("string")
        .serverType("string")
        .targetLdapId("string")
        .tokenExpiration("string")
        .build());
    
    target_ldap_resource = akeyless.TargetLdap("targetLdapResource",
        bind_dn="string",
        bind_dn_password="string",
        ldap_url="string",
        description="string",
        keep_prev_version="string",
        key="string",
        ldap_ca_cert="string",
        max_versions="string",
        name="string",
        server_type="string",
        target_ldap_id="string",
        token_expiration="string")
    
    const targetLdapResource = new akeyless.TargetLdap("targetLdapResource", {
        bindDn: "string",
        bindDnPassword: "string",
        ldapUrl: "string",
        description: "string",
        keepPrevVersion: "string",
        key: "string",
        ldapCaCert: "string",
        maxVersions: "string",
        name: "string",
        serverType: "string",
        targetLdapId: "string",
        tokenExpiration: "string",
    });
    
    type: akeyless:TargetLdap
    properties:
        bindDn: string
        bindDnPassword: string
        description: string
        keepPrevVersion: string
        key: string
        ldapCaCert: string
        ldapUrl: string
        maxVersions: string
        name: string
        serverType: string
        targetLdapId: string
        tokenExpiration: string
    

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

    BindDn string
    Bind DN
    BindDnPassword string
    Bind DN Password
    LdapUrl string
    LDAP Server URL
    Description string
    Description of the object
    KeepPrevVersion string
    Whether to keep previous version [true/false]. If not set, use default according to account settings
    Key string
    The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
    LdapCaCert string
    CA Certificate File Content
    MaxVersions string
    Set the maximum number of versions, limited by the account settings defaults.
    Name string
    Target name
    ServerType string
    Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
    TargetLdapId string
    The ID of this resource.
    TokenExpiration string
    Token expiration
    BindDn string
    Bind DN
    BindDnPassword string
    Bind DN Password
    LdapUrl string
    LDAP Server URL
    Description string
    Description of the object
    KeepPrevVersion string
    Whether to keep previous version [true/false]. If not set, use default according to account settings
    Key string
    The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
    LdapCaCert string
    CA Certificate File Content
    MaxVersions string
    Set the maximum number of versions, limited by the account settings defaults.
    Name string
    Target name
    ServerType string
    Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
    TargetLdapId string
    The ID of this resource.
    TokenExpiration string
    Token expiration
    bind_dn string
    Bind DN
    bind_dn_password string
    Bind DN Password
    ldap_url string
    LDAP Server URL
    description string
    Description of the object
    keep_prev_version string
    Whether to keep previous version [true/false]. If not set, use default according to account settings
    key string
    The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
    ldap_ca_cert string
    CA Certificate File Content
    max_versions string
    Set the maximum number of versions, limited by the account settings defaults.
    name string
    Target name
    server_type string
    Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
    target_ldap_id string
    The ID of this resource.
    token_expiration string
    Token expiration
    bindDn String
    Bind DN
    bindDnPassword String
    Bind DN Password
    ldapUrl String
    LDAP Server URL
    description String
    Description of the object
    keepPrevVersion String
    Whether to keep previous version [true/false]. If not set, use default according to account settings
    key String
    The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
    ldapCaCert String
    CA Certificate File Content
    maxVersions String
    Set the maximum number of versions, limited by the account settings defaults.
    name String
    Target name
    serverType String
    Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
    targetLdapId String
    The ID of this resource.
    tokenExpiration String
    Token expiration
    bindDn string
    Bind DN
    bindDnPassword string
    Bind DN Password
    ldapUrl string
    LDAP Server URL
    description string
    Description of the object
    keepPrevVersion string
    Whether to keep previous version [true/false]. If not set, use default according to account settings
    key string
    The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
    ldapCaCert string
    CA Certificate File Content
    maxVersions string
    Set the maximum number of versions, limited by the account settings defaults.
    name string
    Target name
    serverType string
    Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
    targetLdapId string
    The ID of this resource.
    tokenExpiration string
    Token expiration
    bind_dn str
    Bind DN
    bind_dn_password str
    Bind DN Password
    ldap_url str
    LDAP Server URL
    description str
    Description of the object
    keep_prev_version str
    Whether to keep previous version [true/false]. If not set, use default according to account settings
    key str
    The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
    ldap_ca_cert str
    CA Certificate File Content
    max_versions str
    Set the maximum number of versions, limited by the account settings defaults.
    name str
    Target name
    server_type str
    Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
    target_ldap_id str
    The ID of this resource.
    token_expiration str
    Token expiration
    bindDn String
    Bind DN
    bindDnPassword String
    Bind DN Password
    ldapUrl String
    LDAP Server URL
    description String
    Description of the object
    keepPrevVersion String
    Whether to keep previous version [true/false]. If not set, use default according to account settings
    key String
    The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
    ldapCaCert String
    CA Certificate File Content
    maxVersions String
    Set the maximum number of versions, limited by the account settings defaults.
    name String
    Target name
    serverType String
    Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
    targetLdapId String
    The ID of this resource.
    tokenExpiration String
    Token expiration

    Outputs

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

    Get an existing TargetLdap 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?: TargetLdapState, opts?: CustomResourceOptions): TargetLdap
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bind_dn: Optional[str] = None,
            bind_dn_password: Optional[str] = None,
            description: Optional[str] = None,
            keep_prev_version: Optional[str] = None,
            key: Optional[str] = None,
            ldap_ca_cert: Optional[str] = None,
            ldap_url: Optional[str] = None,
            max_versions: Optional[str] = None,
            name: Optional[str] = None,
            server_type: Optional[str] = None,
            target_ldap_id: Optional[str] = None,
            token_expiration: Optional[str] = None) -> TargetLdap
    func GetTargetLdap(ctx *Context, name string, id IDInput, state *TargetLdapState, opts ...ResourceOption) (*TargetLdap, error)
    public static TargetLdap Get(string name, Input<string> id, TargetLdapState? state, CustomResourceOptions? opts = null)
    public static TargetLdap get(String name, Output<String> id, TargetLdapState state, CustomResourceOptions options)
    resources:  _:    type: akeyless:TargetLdap    get:      id: ${id}
    import {
      to = akeyless_targetldap.example
      id = "${id}"
    }
    
    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:
    BindDn string
    Bind DN
    BindDnPassword string
    Bind DN Password
    Description string
    Description of the object
    KeepPrevVersion string
    Whether to keep previous version [true/false]. If not set, use default according to account settings
    Key string
    The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
    LdapCaCert string
    CA Certificate File Content
    LdapUrl string
    LDAP Server URL
    MaxVersions string
    Set the maximum number of versions, limited by the account settings defaults.
    Name string
    Target name
    ServerType string
    Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
    TargetLdapId string
    The ID of this resource.
    TokenExpiration string
    Token expiration
    BindDn string
    Bind DN
    BindDnPassword string
    Bind DN Password
    Description string
    Description of the object
    KeepPrevVersion string
    Whether to keep previous version [true/false]. If not set, use default according to account settings
    Key string
    The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
    LdapCaCert string
    CA Certificate File Content
    LdapUrl string
    LDAP Server URL
    MaxVersions string
    Set the maximum number of versions, limited by the account settings defaults.
    Name string
    Target name
    ServerType string
    Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
    TargetLdapId string
    The ID of this resource.
    TokenExpiration string
    Token expiration
    bind_dn string
    Bind DN
    bind_dn_password string
    Bind DN Password
    description string
    Description of the object
    keep_prev_version string
    Whether to keep previous version [true/false]. If not set, use default according to account settings
    key string
    The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
    ldap_ca_cert string
    CA Certificate File Content
    ldap_url string
    LDAP Server URL
    max_versions string
    Set the maximum number of versions, limited by the account settings defaults.
    name string
    Target name
    server_type string
    Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
    target_ldap_id string
    The ID of this resource.
    token_expiration string
    Token expiration
    bindDn String
    Bind DN
    bindDnPassword String
    Bind DN Password
    description String
    Description of the object
    keepPrevVersion String
    Whether to keep previous version [true/false]. If not set, use default according to account settings
    key String
    The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
    ldapCaCert String
    CA Certificate File Content
    ldapUrl String
    LDAP Server URL
    maxVersions String
    Set the maximum number of versions, limited by the account settings defaults.
    name String
    Target name
    serverType String
    Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
    targetLdapId String
    The ID of this resource.
    tokenExpiration String
    Token expiration
    bindDn string
    Bind DN
    bindDnPassword string
    Bind DN Password
    description string
    Description of the object
    keepPrevVersion string
    Whether to keep previous version [true/false]. If not set, use default according to account settings
    key string
    The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
    ldapCaCert string
    CA Certificate File Content
    ldapUrl string
    LDAP Server URL
    maxVersions string
    Set the maximum number of versions, limited by the account settings defaults.
    name string
    Target name
    serverType string
    Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
    targetLdapId string
    The ID of this resource.
    tokenExpiration string
    Token expiration
    bind_dn str
    Bind DN
    bind_dn_password str
    Bind DN Password
    description str
    Description of the object
    keep_prev_version str
    Whether to keep previous version [true/false]. If not set, use default according to account settings
    key str
    The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
    ldap_ca_cert str
    CA Certificate File Content
    ldap_url str
    LDAP Server URL
    max_versions str
    Set the maximum number of versions, limited by the account settings defaults.
    name str
    Target name
    server_type str
    Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
    target_ldap_id str
    The ID of this resource.
    token_expiration str
    Token expiration
    bindDn String
    Bind DN
    bindDnPassword String
    Bind DN Password
    description String
    Description of the object
    keepPrevVersion String
    Whether to keep previous version [true/false]. If not set, use default according to account settings
    key String
    The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
    ldapCaCert String
    CA Certificate File Content
    ldapUrl String
    LDAP Server URL
    maxVersions String
    Set the maximum number of versions, limited by the account settings defaults.
    name String
    Target name
    serverType String
    Set Ldap server type, Options:[OpenLDAP, ActiveDirectory]. Default is OpenLDAP
    targetLdapId String
    The ID of this resource.
    tokenExpiration String
    Token expiration

    Package Details

    Repository
    akeyless akeyless-community/terraform-provider-akeyless
    License
    Notes
    This Pulumi package is based on the akeyless Terraform Provider.
    Viewing docs for akeyless 2.0.1
    published on Monday, Apr 27, 2026 by akeyless-community
      Try Pulumi Cloud free. Your team will thank you.