# LDAP Group

## Example Usage

***

{% tabs %}
{% tab title="Terraform" %}
{% code title="ldap-directory-integration.tf" %}

```tf
resource "apono_integration" "ldap-directory-integration" {
  name                     = "LDAP Group"
  type                     = "ldap-directory"
  connector_id             = "apono-connector-id"
  connected_resource_types = ["ldap-directory-group"]
  metadata = {
    url = "<LDAP Server URL>"
    custom_ca_cert = "<Self signed server or CA certificate>"
    domain = "<Domain>"
    groups_scope = "<Groups Scope>"
    users_scope = "<Users Scope>"
    user_email_attribute = "<User Email Attribute>"
  }
  kubernetes_secret = {
    name      = "name_template_value"
    namespace = "namespace_template_value"
  }
}
```

{% endcode %}
{% endtab %}

{% tab title="Terraform V2" %}
{% code title="ldap-directory-integration.tf" %}

```tf
resource "apono_resource_integration" "ldap-directory-integration" {
  name                     = "LDAP Group"
  type                     = "ldap-directory"
  connector_id             = "apono-connector-id"
  connected_resource_types = ["ldap-directory-group"]
  integration_config = {
    url = "<LDAP Server URL>"
    custom_ca_cert = "<Self signed server or CA certificate>"
    domain = "<Domain>"
    groups_scope = "<Groups Scope>"
    users_scope = "<Users Scope>"
    user_email_attribute = "<User Email Attribute>"
  }
  secret_store_config = {
    kubernetes = {
      name      = "name_template_value"
      namespace = "namespace_template_value"
    }
}
```

{% endcode %}
{% endtab %}

{% tab title="Public API" %}
{% code title="ldap-directory-integration.json" %}

```json
{
    "ldap-directory-integration": {
        "name": "LDAP Group",
        "type": "ldap-directory",
        "connector_id": "apono-connector-id",
        "connected_resource_types": [
            "ldap-directory-group"
        ],
        "integration_config": {
            "url": "<LDAP Server URL>",
            "custom_ca_cert": "<Self signed server or CA certificate>",
            "domain": "<Domain>",
            "groups_scope": "<Groups Scope>",
            "users_scope": "<Users Scope>",
            "user_email_attribute": "<User Email Attribute>",
        },
	"secret_store_config": {
    	    "name": "name_template_value",
    	    "namespace": "namespace_template_value"
  	    }
    }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Schema

***

* `type` ldap-directory
* `connected_resource_types` List of resource types to sync.

<details>

<summary>Available resource types you can use</summary>

* ldap-directory-group

</details>

### Integration Config

***

* `url` (Required | String) LDAP Server URL
* `custom_ca_cert` (Optional | String) Self signed server or CA certificate
* `domain` (Required | String) Domain
* `groups_scope` (Optional | String) Groups Scope
* `users_scope` (Optional | String) Users Scope
* `user_email_attribute` (Optional | String) User Email Attribute
