Skip to content

Commit

Permalink
docs: added other example for ldap configuration docs (#520)
Browse files Browse the repository at this point in the history
Co-authored-by: Edgar Lopez <edgarlopez@pop-os.localdomain>
  • Loading branch information
coderGo93 and Edgar Lopez committed Aug 24, 2021
1 parent 870d61e commit 8dc39e2
Showing 1 changed file with 34 additions and 10 deletions.
44 changes: 34 additions & 10 deletions website/docs/r/ldap_configuration.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,43 @@ description: |-

## Example Usage

```hcl
```terraform
resource "mongodbatlas_project" "test" {
name = "NAME OF THE PROJECT"
org_id = "ORG ID"
name = "NAME OF THE PROJECT"
org_id = "ORG ID"
}
resource "mongodbatlas_ldap_configuration" "test" {
project_id = mongodbatlas_project.test.id
authentication_enabled = true
hostname = "HOSTNAME"
port = 636
bind_username = "USERNAME"
bind_password = "PASSWORD"
project_id = mongodbatlas_project.test.id
authentication_enabled = true
hostname = "HOSTNAME"
port = 636
bind_username = "USERNAME"
bind_password = "PASSWORD"
}
```

## Example Usage of LDAP with user to DN mapping

```terraform
resource "mongodbatlas_project" "test" {
name = "NAME OF THE PROJECT"
org_id = "ORG ID"
}
resource "mongodbatlas_ldap_configuration" "test" {
project_id = mongodbatlas_project.test.id
authentication_enabled = true
hostname = "HOSTNAME"
port = 636
bind_username = "USERNAME"
bind_password = "PASSWORD"
ca_certificate = "CA CERTIFICATE"
authz_query_template = "{USER}?memberOf?base"
user_to_dn_mapping {
match = "(.+)"
ldap_query = "DC=example,DC=com??sub?(userPrincipalName={0})"
}
}
```

Expand Down Expand Up @@ -52,4 +76,4 @@ LDAP Configuration must be imported using project ID, e.g.
$ terraform import mongodbatlas_ldap_configuration.test 5d09d6a59ccf6445652a444a
```

For more information see: [MongoDB Atlas API Reference.](https://docs.atlas.mongodb.com/reference/api/ldaps-configuration-save)
For more information see: [MongoDB Atlas API Reference.](https://docs.atlas.mongodb.com/reference/api/ldaps-configuration-save)

0 comments on commit 8dc39e2

Please sign in to comment.