1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. ldap
  5. SecretBackendLibrarySet
HashiCorp Vault v6.3.0 published on Thursday, Aug 8, 2024 by Pulumi

vault.ldap.SecretBackendLibrarySet

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.3.0 published on Thursday, Aug 8, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const config = new vault.ldap.SecretBackend("config", {
        path: "ldap",
        binddn: "CN=Administrator,CN=Users,DC=corp,DC=example,DC=net",
        bindpass: "SuperSecretPassw0rd",
        url: "ldaps://localhost",
        insecureTls: true,
        userdn: "CN=Users,DC=corp,DC=example,DC=net",
    });
    const qa = new vault.ldap.SecretBackendLibrarySet("qa", {
        mount: config.path,
        name: "qa",
        serviceAccountNames: [
            "Bob",
            "Mary",
        ],
        ttl: 60,
        disableCheckInEnforcement: true,
        maxTtl: 120,
    });
    
    import pulumi
    import pulumi_vault as vault
    
    config = vault.ldap.SecretBackend("config",
        path="ldap",
        binddn="CN=Administrator,CN=Users,DC=corp,DC=example,DC=net",
        bindpass="SuperSecretPassw0rd",
        url="ldaps://localhost",
        insecure_tls=True,
        userdn="CN=Users,DC=corp,DC=example,DC=net")
    qa = vault.ldap.SecretBackendLibrarySet("qa",
        mount=config.path,
        name="qa",
        service_account_names=[
            "Bob",
            "Mary",
        ],
        ttl=60,
        disable_check_in_enforcement=True,
        max_ttl=120)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/ldap"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		config, err := ldap.NewSecretBackend(ctx, "config", &ldap.SecretBackendArgs{
    			Path:        pulumi.String("ldap"),
    			Binddn:      pulumi.String("CN=Administrator,CN=Users,DC=corp,DC=example,DC=net"),
    			Bindpass:    pulumi.String("SuperSecretPassw0rd"),
    			Url:         pulumi.String("ldaps://localhost"),
    			InsecureTls: pulumi.Bool(true),
    			Userdn:      pulumi.String("CN=Users,DC=corp,DC=example,DC=net"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ldap.NewSecretBackendLibrarySet(ctx, "qa", &ldap.SecretBackendLibrarySetArgs{
    			Mount: config.Path,
    			Name:  pulumi.String("qa"),
    			ServiceAccountNames: pulumi.StringArray{
    				pulumi.String("Bob"),
    				pulumi.String("Mary"),
    			},
    			Ttl:                       pulumi.Int(60),
    			DisableCheckInEnforcement: pulumi.Bool(true),
    			MaxTtl:                    pulumi.Int(120),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Vault.Ldap.SecretBackend("config", new()
        {
            Path = "ldap",
            Binddn = "CN=Administrator,CN=Users,DC=corp,DC=example,DC=net",
            Bindpass = "SuperSecretPassw0rd",
            Url = "ldaps://localhost",
            InsecureTls = true,
            Userdn = "CN=Users,DC=corp,DC=example,DC=net",
        });
    
        var qa = new Vault.Ldap.SecretBackendLibrarySet("qa", new()
        {
            Mount = config.Path,
            Name = "qa",
            ServiceAccountNames = new[]
            {
                "Bob",
                "Mary",
            },
            Ttl = 60,
            DisableCheckInEnforcement = true,
            MaxTtl = 120,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.ldap.SecretBackend;
    import com.pulumi.vault.ldap.SecretBackendArgs;
    import com.pulumi.vault.ldap.SecretBackendLibrarySet;
    import com.pulumi.vault.ldap.SecretBackendLibrarySetArgs;
    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 config = new SecretBackend("config", SecretBackendArgs.builder()
                .path("ldap")
                .binddn("CN=Administrator,CN=Users,DC=corp,DC=example,DC=net")
                .bindpass("SuperSecretPassw0rd")
                .url("ldaps://localhost")
                .insecureTls("true")
                .userdn("CN=Users,DC=corp,DC=example,DC=net")
                .build());
    
            var qa = new SecretBackendLibrarySet("qa", SecretBackendLibrarySetArgs.builder()
                .mount(config.path())
                .name("qa")
                .serviceAccountNames(            
                    "Bob",
                    "Mary")
                .ttl(60)
                .disableCheckInEnforcement(true)
                .maxTtl(120)
                .build());
    
        }
    }
    
    resources:
      config:
        type: vault:ldap:SecretBackend
        properties:
          path: ldap
          binddn: CN=Administrator,CN=Users,DC=corp,DC=example,DC=net
          bindpass: SuperSecretPassw0rd
          url: ldaps://localhost
          insecureTls: 'true'
          userdn: CN=Users,DC=corp,DC=example,DC=net
      qa:
        type: vault:ldap:SecretBackendLibrarySet
        properties:
          mount: ${config.path}
          name: qa
          serviceAccountNames:
            - Bob
            - Mary
          ttl: 60
          disableCheckInEnforcement: true
          maxTtl: 120
    

    Create SecretBackendLibrarySet Resource

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

    Constructor syntax

    new SecretBackendLibrarySet(name: string, args: SecretBackendLibrarySetArgs, opts?: CustomResourceOptions);
    @overload
    def SecretBackendLibrarySet(resource_name: str,
                                args: SecretBackendLibrarySetArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecretBackendLibrarySet(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                service_account_names: Optional[Sequence[str]] = None,
                                disable_check_in_enforcement: Optional[bool] = None,
                                max_ttl: Optional[int] = None,
                                mount: Optional[str] = None,
                                name: Optional[str] = None,
                                namespace: Optional[str] = None,
                                ttl: Optional[int] = None)
    func NewSecretBackendLibrarySet(ctx *Context, name string, args SecretBackendLibrarySetArgs, opts ...ResourceOption) (*SecretBackendLibrarySet, error)
    public SecretBackendLibrarySet(string name, SecretBackendLibrarySetArgs args, CustomResourceOptions? opts = null)
    public SecretBackendLibrarySet(String name, SecretBackendLibrarySetArgs args)
    public SecretBackendLibrarySet(String name, SecretBackendLibrarySetArgs args, CustomResourceOptions options)
    
    type: vault:ldap:SecretBackendLibrarySet
    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 SecretBackendLibrarySetArgs
    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 SecretBackendLibrarySetArgs
    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 SecretBackendLibrarySetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecretBackendLibrarySetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecretBackendLibrarySetArgs
    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 secretBackendLibrarySetResource = new Vault.Ldap.SecretBackendLibrarySet("secretBackendLibrarySetResource", new()
    {
        ServiceAccountNames = new[]
        {
            "string",
        },
        DisableCheckInEnforcement = false,
        MaxTtl = 0,
        Mount = "string",
        Name = "string",
        Namespace = "string",
        Ttl = 0,
    });
    
    example, err := ldap.NewSecretBackendLibrarySet(ctx, "secretBackendLibrarySetResource", &ldap.SecretBackendLibrarySetArgs{
    	ServiceAccountNames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	DisableCheckInEnforcement: pulumi.Bool(false),
    	MaxTtl:                    pulumi.Int(0),
    	Mount:                     pulumi.String("string"),
    	Name:                      pulumi.String("string"),
    	Namespace:                 pulumi.String("string"),
    	Ttl:                       pulumi.Int(0),
    })
    
    var secretBackendLibrarySetResource = new SecretBackendLibrarySet("secretBackendLibrarySetResource", SecretBackendLibrarySetArgs.builder()
        .serviceAccountNames("string")
        .disableCheckInEnforcement(false)
        .maxTtl(0)
        .mount("string")
        .name("string")
        .namespace("string")
        .ttl(0)
        .build());
    
    secret_backend_library_set_resource = vault.ldap.SecretBackendLibrarySet("secretBackendLibrarySetResource",
        service_account_names=["string"],
        disable_check_in_enforcement=False,
        max_ttl=0,
        mount="string",
        name="string",
        namespace="string",
        ttl=0)
    
    const secretBackendLibrarySetResource = new vault.ldap.SecretBackendLibrarySet("secretBackendLibrarySetResource", {
        serviceAccountNames: ["string"],
        disableCheckInEnforcement: false,
        maxTtl: 0,
        mount: "string",
        name: "string",
        namespace: "string",
        ttl: 0,
    });
    
    type: vault:ldap:SecretBackendLibrarySet
    properties:
        disableCheckInEnforcement: false
        maxTtl: 0
        mount: string
        name: string
        namespace: string
        serviceAccountNames:
            - string
        ttl: 0
    

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

    ServiceAccountNames List<string>
    Specifies the slice of service accounts mapped to this set.
    DisableCheckInEnforcement bool
    Disable enforcing that service accounts must be checked in by the entity or client token that checked them out. Defaults to false.
    MaxTtl int
    The maximum password time-to-live in seconds. Defaults to the configuration max_ttl if not provided.
    Mount string
    The path where the LDAP secrets backend is mounted.
    Name string
    The name to identify this set of service accounts. Must be unique within the backend.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    Ttl int
    The password time-to-live in seconds. Defaults to the configuration ttl if not provided.
    ServiceAccountNames []string
    Specifies the slice of service accounts mapped to this set.
    DisableCheckInEnforcement bool
    Disable enforcing that service accounts must be checked in by the entity or client token that checked them out. Defaults to false.
    MaxTtl int
    The maximum password time-to-live in seconds. Defaults to the configuration max_ttl if not provided.
    Mount string
    The path where the LDAP secrets backend is mounted.
    Name string
    The name to identify this set of service accounts. Must be unique within the backend.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    Ttl int
    The password time-to-live in seconds. Defaults to the configuration ttl if not provided.
    serviceAccountNames List<String>
    Specifies the slice of service accounts mapped to this set.
    disableCheckInEnforcement Boolean
    Disable enforcing that service accounts must be checked in by the entity or client token that checked them out. Defaults to false.
    maxTtl Integer
    The maximum password time-to-live in seconds. Defaults to the configuration max_ttl if not provided.
    mount String
    The path where the LDAP secrets backend is mounted.
    name String
    The name to identify this set of service accounts. Must be unique within the backend.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    ttl Integer
    The password time-to-live in seconds. Defaults to the configuration ttl if not provided.
    serviceAccountNames string[]
    Specifies the slice of service accounts mapped to this set.
    disableCheckInEnforcement boolean
    Disable enforcing that service accounts must be checked in by the entity or client token that checked them out. Defaults to false.
    maxTtl number
    The maximum password time-to-live in seconds. Defaults to the configuration max_ttl if not provided.
    mount string
    The path where the LDAP secrets backend is mounted.
    name string
    The name to identify this set of service accounts. Must be unique within the backend.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    ttl number
    The password time-to-live in seconds. Defaults to the configuration ttl if not provided.
    service_account_names Sequence[str]
    Specifies the slice of service accounts mapped to this set.
    disable_check_in_enforcement bool
    Disable enforcing that service accounts must be checked in by the entity or client token that checked them out. Defaults to false.
    max_ttl int
    The maximum password time-to-live in seconds. Defaults to the configuration max_ttl if not provided.
    mount str
    The path where the LDAP secrets backend is mounted.
    name str
    The name to identify this set of service accounts. Must be unique within the backend.
    namespace str
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    ttl int
    The password time-to-live in seconds. Defaults to the configuration ttl if not provided.
    serviceAccountNames List<String>
    Specifies the slice of service accounts mapped to this set.
    disableCheckInEnforcement Boolean
    Disable enforcing that service accounts must be checked in by the entity or client token that checked them out. Defaults to false.
    maxTtl Number
    The maximum password time-to-live in seconds. Defaults to the configuration max_ttl if not provided.
    mount String
    The path where the LDAP secrets backend is mounted.
    name String
    The name to identify this set of service accounts. Must be unique within the backend.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    ttl Number
    The password time-to-live in seconds. Defaults to the configuration ttl if not provided.

    Outputs

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

    Get an existing SecretBackendLibrarySet 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?: SecretBackendLibrarySetState, opts?: CustomResourceOptions): SecretBackendLibrarySet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            disable_check_in_enforcement: Optional[bool] = None,
            max_ttl: Optional[int] = None,
            mount: Optional[str] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            service_account_names: Optional[Sequence[str]] = None,
            ttl: Optional[int] = None) -> SecretBackendLibrarySet
    func GetSecretBackendLibrarySet(ctx *Context, name string, id IDInput, state *SecretBackendLibrarySetState, opts ...ResourceOption) (*SecretBackendLibrarySet, error)
    public static SecretBackendLibrarySet Get(string name, Input<string> id, SecretBackendLibrarySetState? state, CustomResourceOptions? opts = null)
    public static SecretBackendLibrarySet get(String name, Output<String> id, SecretBackendLibrarySetState 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:
    DisableCheckInEnforcement bool
    Disable enforcing that service accounts must be checked in by the entity or client token that checked them out. Defaults to false.
    MaxTtl int
    The maximum password time-to-live in seconds. Defaults to the configuration max_ttl if not provided.
    Mount string
    The path where the LDAP secrets backend is mounted.
    Name string
    The name to identify this set of service accounts. Must be unique within the backend.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    ServiceAccountNames List<string>
    Specifies the slice of service accounts mapped to this set.
    Ttl int
    The password time-to-live in seconds. Defaults to the configuration ttl if not provided.
    DisableCheckInEnforcement bool
    Disable enforcing that service accounts must be checked in by the entity or client token that checked them out. Defaults to false.
    MaxTtl int
    The maximum password time-to-live in seconds. Defaults to the configuration max_ttl if not provided.
    Mount string
    The path where the LDAP secrets backend is mounted.
    Name string
    The name to identify this set of service accounts. Must be unique within the backend.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    ServiceAccountNames []string
    Specifies the slice of service accounts mapped to this set.
    Ttl int
    The password time-to-live in seconds. Defaults to the configuration ttl if not provided.
    disableCheckInEnforcement Boolean
    Disable enforcing that service accounts must be checked in by the entity or client token that checked them out. Defaults to false.
    maxTtl Integer
    The maximum password time-to-live in seconds. Defaults to the configuration max_ttl if not provided.
    mount String
    The path where the LDAP secrets backend is mounted.
    name String
    The name to identify this set of service accounts. Must be unique within the backend.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    serviceAccountNames List<String>
    Specifies the slice of service accounts mapped to this set.
    ttl Integer
    The password time-to-live in seconds. Defaults to the configuration ttl if not provided.
    disableCheckInEnforcement boolean
    Disable enforcing that service accounts must be checked in by the entity or client token that checked them out. Defaults to false.
    maxTtl number
    The maximum password time-to-live in seconds. Defaults to the configuration max_ttl if not provided.
    mount string
    The path where the LDAP secrets backend is mounted.
    name string
    The name to identify this set of service accounts. Must be unique within the backend.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    serviceAccountNames string[]
    Specifies the slice of service accounts mapped to this set.
    ttl number
    The password time-to-live in seconds. Defaults to the configuration ttl if not provided.
    disable_check_in_enforcement bool
    Disable enforcing that service accounts must be checked in by the entity or client token that checked them out. Defaults to false.
    max_ttl int
    The maximum password time-to-live in seconds. Defaults to the configuration max_ttl if not provided.
    mount str
    The path where the LDAP secrets backend is mounted.
    name str
    The name to identify this set of service accounts. Must be unique within the backend.
    namespace str
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    service_account_names Sequence[str]
    Specifies the slice of service accounts mapped to this set.
    ttl int
    The password time-to-live in seconds. Defaults to the configuration ttl if not provided.
    disableCheckInEnforcement Boolean
    Disable enforcing that service accounts must be checked in by the entity or client token that checked them out. Defaults to false.
    maxTtl Number
    The maximum password time-to-live in seconds. Defaults to the configuration max_ttl if not provided.
    mount String
    The path where the LDAP secrets backend is mounted.
    name String
    The name to identify this set of service accounts. Must be unique within the backend.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    serviceAccountNames List<String>
    Specifies the slice of service accounts mapped to this set.
    ttl Number
    The password time-to-live in seconds. Defaults to the configuration ttl if not provided.

    Import

    LDAP secret backend libraries can be imported using the path, e.g.

    $ pulumi import vault:ldap/secretBackendLibrarySet:SecretBackendLibrarySet qa ldap/library/bob
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vault Terraform Provider.
    vault logo
    HashiCorp Vault v6.3.0 published on Thursday, Aug 8, 2024 by Pulumi