MongoDB Atlas v3.16.3 published on Friday, Jun 28, 2024 by Pulumi
mongodbatlas.getLdapConfiguration
Explore with Pulumi AI
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 dictionaryThe following arguments are supported:
- Project
Id string - Identifier for the Atlas project associated with the LDAP over TLS/SSL configuration.
 
- Project
Id string - Identifier for the Atlas project associated with the LDAP over TLS/SSL configuration.
 
- project
Id String - Identifier for the Atlas project associated with the LDAP over TLS/SSL configuration.
 
- project
Id 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.
 
- project
Id String - Identifier for the Atlas project associated with the LDAP over TLS/SSL configuration.
 
getLdapConfiguration Result
The following output properties are available:
- Authentication
Enabled bool - Specifies whether user authentication with LDAP is enabled.
 - bool
 - Specifies whether user authorization with LDAP is enabled.
 - Authz
Query stringTemplate  - An LDAP query template that Atlas executes to obtain the LDAP groups to which the authenticated user belongs.
 - Bind
Password string - The password used to authenticate the 
bind_username. - Bind
Username string - The user DN that Atlas uses to connect to the LDAP server.
 - Ca
Certificate 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.
 - Project
Id string - User
To List<GetDn Mappings Ldap Configuration User To Dn Mapping>  - Maps an LDAP username for authentication to an LDAP Distinguished Name (DN).
 
- Authentication
Enabled bool - Specifies whether user authentication with LDAP is enabled.
 - bool
 - Specifies whether user authorization with LDAP is enabled.
 - Authz
Query stringTemplate  - An LDAP query template that Atlas executes to obtain the LDAP groups to which the authenticated user belongs.
 - Bind
Password string - The password used to authenticate the 
bind_username. - Bind
Username string - The user DN that Atlas uses to connect to the LDAP server.
 - Ca
Certificate 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.
 - Project
Id string - User
To []GetDn Mappings Ldap Configuration User To Dn Mapping  - Maps an LDAP username for authentication to an LDAP Distinguished Name (DN).
 
- authentication
Enabled Boolean - Specifies whether user authentication with LDAP is enabled.
 - Boolean
 - Specifies whether user authorization with LDAP is enabled.
 - authz
Query StringTemplate  - An LDAP query template that Atlas executes to obtain the LDAP groups to which the authenticated user belongs.
 - bind
Password String - The password used to authenticate the 
bind_username. - bind
Username String - The user DN that Atlas uses to connect to the LDAP server.
 - ca
Certificate 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.
 - project
Id String - user
To List<GetDn Mappings Ldap Configuration User To Dn Mapping>  - Maps an LDAP username for authentication to an LDAP Distinguished Name (DN).
 
- authentication
Enabled boolean - Specifies whether user authentication with LDAP is enabled.
 - boolean
 - Specifies whether user authorization with LDAP is enabled.
 - authz
Query stringTemplate  - An LDAP query template that Atlas executes to obtain the LDAP groups to which the authenticated user belongs.
 - bind
Password string - The password used to authenticate the 
bind_username. - bind
Username string - The user DN that Atlas uses to connect to the LDAP server.
 - ca
Certificate 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.
 - project
Id string - user
To GetDn Mappings Ldap Configuration User To Dn Mapping[]  - Maps an LDAP username for authentication to an LDAP Distinguished Name (DN).
 
- authentication_
enabled bool - Specifies whether user authentication with LDAP is enabled.
 - bool
 - Specifies whether user authorization with LDAP is enabled.
 - authz_
query_ strtemplate  - 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_ Sequence[Getdn_ mappings Ldap Configuration User To Dn Mapping]  - Maps an LDAP username for authentication to an LDAP Distinguished Name (DN).
 
- authentication
Enabled Boolean - Specifies whether user authentication with LDAP is enabled.
 - Boolean
 - Specifies whether user authorization with LDAP is enabled.
 - authz
Query StringTemplate  - An LDAP query template that Atlas executes to obtain the LDAP groups to which the authenticated user belongs.
 - bind
Password String - The password used to authenticate the 
bind_username. - bind
Username String - The user DN that Atlas uses to connect to the LDAP server.
 - ca
Certificate 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.
 - project
Id String - user
To List<Property Map>Dn Mappings  - Maps an LDAP username for authentication to an LDAP Distinguished Name (DN).
 
Supporting Types
GetLdapConfigurationUserToDnMapping      
- Ldap
Query string - An LDAP query formatting template that inserts the LDAP name matched by the 
matchregular 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 
matchregular expression into an LDAP Distinguished Name. 
- Ldap
Query string - An LDAP query formatting template that inserts the LDAP name matched by the 
matchregular 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 
matchregular expression into an LDAP Distinguished Name. 
- ldap
Query String - An LDAP query formatting template that inserts the LDAP name matched by the 
matchregular 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 
matchregular expression into an LDAP Distinguished Name. 
- ldap
Query string - An LDAP query formatting template that inserts the LDAP name matched by the 
matchregular 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 
matchregular expression into an LDAP Distinguished Name. 
- ldap_
query str - An LDAP query formatting template that inserts the LDAP name matched by the 
matchregular 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 
matchregular expression into an LDAP Distinguished Name. 
- ldap
Query String - An LDAP query formatting template that inserts the LDAP name matched by the 
matchregular 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 
matchregular 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 
mongodbatlasTerraform Provider.