1. Packages
  2. MongoDB Atlas
  3. API Docs
  4. getLdapConfiguration
MongoDB Atlas v3.16.0 published on Wednesday, Jun 12, 2024 by Pulumi

mongodbatlas.getLdapConfiguration

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.16.0 published on Wednesday, Jun 12, 2024 by Pulumi

    mongodbatlas.LdapConfiguration describes a LDAP Configuration.

    NOTE: Groups and projects are synonymous terms. You may find group_id in the official documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const testProject = new mongodbatlas.Project("test", {
        name: "NAME OF THE PROJECT",
        orgId: "ORG ID",
    });
    const testLdapConfiguration = new mongodbatlas.LdapConfiguration("test", {
        projectId: testProject.id,
        authenticationEnabled: true,
        hostname: "HOSTNAME",
        port: 636,
        bindUsername: "USERNAME",
        bindPassword: "PASSWORD",
    });
    const test = mongodbatlas.getLdapConfigurationOutput({
        projectId: testLdapConfiguration.id,
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test_project = mongodbatlas.Project("test",
        name="NAME OF THE PROJECT",
        org_id="ORG ID")
    test_ldap_configuration = mongodbatlas.LdapConfiguration("test",
        project_id=test_project.id,
        authentication_enabled=True,
        hostname="HOSTNAME",
        port=636,
        bind_username="USERNAME",
        bind_password="PASSWORD")
    test = mongodbatlas.get_ldap_configuration_output(project_id=test_ldap_configuration.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		testProject, err := mongodbatlas.NewProject(ctx, "test", &mongodbatlas.ProjectArgs{
    			Name:  pulumi.String("NAME OF THE PROJECT"),
    			OrgId: pulumi.String("ORG ID"),
    		})
    		if err != nil {
    			return err
    		}
    		testLdapConfiguration, err := mongodbatlas.NewLdapConfiguration(ctx, "test", &mongodbatlas.LdapConfigurationArgs{
    			ProjectId:             testProject.ID(),
    			AuthenticationEnabled: pulumi.Bool(true),
    			Hostname:              pulumi.String("HOSTNAME"),
    			Port:                  pulumi.Int(636),
    			BindUsername:          pulumi.String("USERNAME"),
    			BindPassword:          pulumi.String("PASSWORD"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = mongodbatlas.LookupLdapConfigurationOutput(ctx, mongodbatlas.GetLdapConfigurationOutputArgs{
    			ProjectId: testLdapConfiguration.ID(),
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var testProject = new Mongodbatlas.Project("test", new()
        {
            Name = "NAME OF THE PROJECT",
            OrgId = "ORG ID",
        });
    
        var testLdapConfiguration = new Mongodbatlas.LdapConfiguration("test", new()
        {
            ProjectId = testProject.Id,
            AuthenticationEnabled = true,
            Hostname = "HOSTNAME",
            Port = 636,
            BindUsername = "USERNAME",
            BindPassword = "PASSWORD",
        });
    
        var test = Mongodbatlas.GetLdapConfiguration.Invoke(new()
        {
            ProjectId = testLdapConfiguration.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.Project;
    import com.pulumi.mongodbatlas.ProjectArgs;
    import com.pulumi.mongodbatlas.LdapConfiguration;
    import com.pulumi.mongodbatlas.LdapConfigurationArgs;
    import com.pulumi.mongodbatlas.MongodbatlasFunctions;
    import com.pulumi.mongodbatlas.inputs.GetLdapConfigurationArgs;
    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 testProject = new Project("testProject", ProjectArgs.builder()
                .name("NAME OF THE PROJECT")
                .orgId("ORG ID")
                .build());
    
            var testLdapConfiguration = new LdapConfiguration("testLdapConfiguration", LdapConfigurationArgs.builder()
                .projectId(testProject.id())
                .authenticationEnabled(true)
                .hostname("HOSTNAME")
                .port(636)
                .bindUsername("USERNAME")
                .bindPassword("PASSWORD")
                .build());
    
            final var test = MongodbatlasFunctions.getLdapConfiguration(GetLdapConfigurationArgs.builder()
                .projectId(testLdapConfiguration.id())
                .build());
    
        }
    }
    
    resources:
      testProject:
        type: mongodbatlas:Project
        name: test
        properties:
          name: NAME OF THE PROJECT
          orgId: ORG ID
      testLdapConfiguration:
        type: mongodbatlas:LdapConfiguration
        name: test
        properties:
          projectId: ${testProject.id}
          authenticationEnabled: true
          hostname: HOSTNAME
          port: 636
          bindUsername: USERNAME
          bindPassword: PASSWORD
    variables:
      test:
        fn::invoke:
          Function: mongodbatlas:getLdapConfiguration
          Arguments:
            projectId: ${testLdapConfiguration.id}
    

    Using getLdapConfiguration

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getLdapConfiguration(args: GetLdapConfigurationArgs, opts?: InvokeOptions): Promise<GetLdapConfigurationResult>
    function getLdapConfigurationOutput(args: GetLdapConfigurationOutputArgs, opts?: InvokeOptions): Output<GetLdapConfigurationResult>
    def get_ldap_configuration(project_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetLdapConfigurationResult
    def get_ldap_configuration_output(project_id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetLdapConfigurationResult]
    func LookupLdapConfiguration(ctx *Context, args *LookupLdapConfigurationArgs, opts ...InvokeOption) (*LookupLdapConfigurationResult, error)
    func LookupLdapConfigurationOutput(ctx *Context, args *LookupLdapConfigurationOutputArgs, opts ...InvokeOption) LookupLdapConfigurationResultOutput

    > Note: This function is named LookupLdapConfiguration in the Go SDK.

    public static class GetLdapConfiguration 
    {
        public static Task<GetLdapConfigurationResult> InvokeAsync(GetLdapConfigurationArgs args, InvokeOptions? opts = null)
        public static Output<GetLdapConfigurationResult> Invoke(GetLdapConfigurationInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLdapConfigurationResult> getLdapConfiguration(GetLdapConfigurationArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: mongodbatlas:index/getLdapConfiguration:getLdapConfiguration
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProjectId string
    Identifier for the Atlas project associated with the LDAP over TLS/SSL configuration.
    ProjectId string
    Identifier for the Atlas project associated with the LDAP over TLS/SSL configuration.
    projectId String
    Identifier for the Atlas project associated with the LDAP over TLS/SSL configuration.
    projectId string
    Identifier for the Atlas project associated with the LDAP over TLS/SSL configuration.
    project_id str
    Identifier for the Atlas project associated with the LDAP over TLS/SSL configuration.
    projectId String
    Identifier for the Atlas project associated with the LDAP over TLS/SSL configuration.

    getLdapConfiguration Result

    The following output properties are available:

    AuthenticationEnabled bool
    Specifies whether user authentication with LDAP is enabled.
    AuthorizationEnabled bool
    Specifies whether user authorization with LDAP is enabled.
    AuthzQueryTemplate string
    An LDAP query template that Atlas executes to obtain the LDAP groups to which the authenticated user belongs.
    BindPassword string
    The password used to authenticate the bind_username.
    BindUsername string
    The user DN that Atlas uses to connect to the LDAP server.
    CaCertificate string
    CA certificate used to verify the identify of the LDAP server.
    Hostname string
    (Required) The hostname or IP address of the LDAP server.
    Id string
    The provider-assigned unique ID for this managed resource.
    Port int
    The port to which the LDAP server listens for client connections.
    ProjectId string
    UserToDnMappings List<GetLdapConfigurationUserToDnMapping>
    Maps an LDAP username for authentication to an LDAP Distinguished Name (DN).
    AuthenticationEnabled bool
    Specifies whether user authentication with LDAP is enabled.
    AuthorizationEnabled bool
    Specifies whether user authorization with LDAP is enabled.
    AuthzQueryTemplate string
    An LDAP query template that Atlas executes to obtain the LDAP groups to which the authenticated user belongs.
    BindPassword string
    The password used to authenticate the bind_username.
    BindUsername string
    The user DN that Atlas uses to connect to the LDAP server.
    CaCertificate string
    CA certificate used to verify the identify of the LDAP server.
    Hostname string
    (Required) The hostname or IP address of the LDAP server.
    Id string
    The provider-assigned unique ID for this managed resource.
    Port int
    The port to which the LDAP server listens for client connections.
    ProjectId string
    UserToDnMappings []GetLdapConfigurationUserToDnMapping
    Maps an LDAP username for authentication to an LDAP Distinguished Name (DN).
    authenticationEnabled Boolean
    Specifies whether user authentication with LDAP is enabled.
    authorizationEnabled Boolean
    Specifies whether user authorization with LDAP is enabled.
    authzQueryTemplate String
    An LDAP query template that Atlas executes to obtain the LDAP groups to which the authenticated user belongs.
    bindPassword String
    The password used to authenticate the bind_username.
    bindUsername String
    The user DN that Atlas uses to connect to the LDAP server.
    caCertificate String
    CA certificate used to verify the identify of the LDAP server.
    hostname String
    (Required) The hostname or IP address of the LDAP server.
    id String
    The provider-assigned unique ID for this managed resource.
    port Integer
    The port to which the LDAP server listens for client connections.
    projectId String
    userToDnMappings List<GetLdapConfigurationUserToDnMapping>
    Maps an LDAP username for authentication to an LDAP Distinguished Name (DN).
    authenticationEnabled boolean
    Specifies whether user authentication with LDAP is enabled.
    authorizationEnabled boolean
    Specifies whether user authorization with LDAP is enabled.
    authzQueryTemplate string
    An LDAP query template that Atlas executes to obtain the LDAP groups to which the authenticated user belongs.
    bindPassword string
    The password used to authenticate the bind_username.
    bindUsername string
    The user DN that Atlas uses to connect to the LDAP server.
    caCertificate string
    CA certificate used to verify the identify of the LDAP server.
    hostname string
    (Required) The hostname or IP address of the LDAP server.
    id string
    The provider-assigned unique ID for this managed resource.
    port number
    The port to which the LDAP server listens for client connections.
    projectId string
    userToDnMappings GetLdapConfigurationUserToDnMapping[]
    Maps an LDAP username for authentication to an LDAP Distinguished Name (DN).
    authentication_enabled bool
    Specifies whether user authentication with LDAP is enabled.
    authorization_enabled bool
    Specifies whether user authorization with LDAP is enabled.
    authz_query_template str
    An LDAP query template that Atlas executes to obtain the LDAP groups to which the authenticated user belongs.
    bind_password str
    The password used to authenticate the bind_username.
    bind_username str
    The user DN that Atlas uses to connect to the LDAP server.
    ca_certificate str
    CA certificate used to verify the identify of the LDAP server.
    hostname str
    (Required) The hostname or IP address of the LDAP server.
    id str
    The provider-assigned unique ID for this managed resource.
    port int
    The port to which the LDAP server listens for client connections.
    project_id str
    user_to_dn_mappings Sequence[GetLdapConfigurationUserToDnMapping]
    Maps an LDAP username for authentication to an LDAP Distinguished Name (DN).
    authenticationEnabled Boolean
    Specifies whether user authentication with LDAP is enabled.
    authorizationEnabled Boolean
    Specifies whether user authorization with LDAP is enabled.
    authzQueryTemplate String
    An LDAP query template that Atlas executes to obtain the LDAP groups to which the authenticated user belongs.
    bindPassword String
    The password used to authenticate the bind_username.
    bindUsername String
    The user DN that Atlas uses to connect to the LDAP server.
    caCertificate String
    CA certificate used to verify the identify of the LDAP server.
    hostname String
    (Required) The hostname or IP address of the LDAP server.
    id String
    The provider-assigned unique ID for this managed resource.
    port Number
    The port to which the LDAP server listens for client connections.
    projectId String
    userToDnMappings List<Property Map>
    Maps an LDAP username for authentication to an LDAP Distinguished Name (DN).

    Supporting Types

    GetLdapConfigurationUserToDnMapping

    LdapQuery string
    An LDAP query formatting template that inserts the LDAP name matched by the match regular expression into an LDAP query URI as specified by RFC 4515 and RFC 4516.
    Match string
    A regular expression to match against a provided LDAP username.
    Substitution string
    An LDAP Distinguished Name (DN) formatting template that converts the LDAP name matched by the match regular expression into an LDAP Distinguished Name.
    LdapQuery string
    An LDAP query formatting template that inserts the LDAP name matched by the match regular expression into an LDAP query URI as specified by RFC 4515 and RFC 4516.
    Match string
    A regular expression to match against a provided LDAP username.
    Substitution string
    An LDAP Distinguished Name (DN) formatting template that converts the LDAP name matched by the match regular expression into an LDAP Distinguished Name.
    ldapQuery String
    An LDAP query formatting template that inserts the LDAP name matched by the match regular expression into an LDAP query URI as specified by RFC 4515 and RFC 4516.
    match String
    A regular expression to match against a provided LDAP username.
    substitution String
    An LDAP Distinguished Name (DN) formatting template that converts the LDAP name matched by the match regular expression into an LDAP Distinguished Name.
    ldapQuery string
    An LDAP query formatting template that inserts the LDAP name matched by the match regular expression into an LDAP query URI as specified by RFC 4515 and RFC 4516.
    match string
    A regular expression to match against a provided LDAP username.
    substitution string
    An LDAP Distinguished Name (DN) formatting template that converts the LDAP name matched by the match regular expression into an LDAP Distinguished Name.
    ldap_query str
    An LDAP query formatting template that inserts the LDAP name matched by the match regular expression into an LDAP query URI as specified by RFC 4515 and RFC 4516.
    match str
    A regular expression to match against a provided LDAP username.
    substitution str
    An LDAP Distinguished Name (DN) formatting template that converts the LDAP name matched by the match regular expression into an LDAP Distinguished Name.
    ldapQuery String
    An LDAP query formatting template that inserts the LDAP name matched by the match regular expression into an LDAP query URI as specified by RFC 4515 and RFC 4516.
    match String
    A regular expression to match against a provided LDAP username.
    substitution String
    An LDAP Distinguished Name (DN) formatting template that converts the LDAP name matched by the match regular expression into an LDAP Distinguished Name.

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo
    MongoDB Atlas v3.16.0 published on Wednesday, Jun 12, 2024 by Pulumi