A modern Terraform provider for managing Active Directory resources via LDAP/LDAPS with native connectivity, automatic domain controller discovery, and comprehensive Kerberos authentication support.
- 🔐 Multiple Authentication Methods: Password, Kerberos (keytab/ccache/password)
- 🌐 Automatic DC Discovery: DNS SRV record-based domain controller discovery
- 🔄 Connection Pooling: Efficient connection management with health checks and failover
- 🎯 Flexible Resource Identification: Support for DN, GUID, SID, UPN, and SAM account names
- ⚡ Performance Optimized: Connection pooling, retry logic, and optional cache warming
- 📦 Terraform Plugin Framework: Built with modern terraform-plugin-framework (v1.15.1)
ad_group- Security and distribution groups with scope managementad_ou- Organizational Units with nesting and protectionad_group_membership- Group membership with flexible member identification
ad_group/ad_groups- Query groups by DN, GUID, SID, or other attributesad_ou- Query organizational unitsad_user/ad_users- Query user informationad_whoami- Current authentication identity
provider::ad::build_hierarchy- Build DN hierarchy from listprovider::ad::normalize_roles- Normalize role identifiers
terraform {
required_providers {
ad = {
source = "isometry/ad"
version = "~> 1.0"
}
}
}
provider "ad" {
domain = "example.com" # Automatic DC discovery via SRV records
username = "[email protected]"
password = var.ad_password
}
resource "ad_group" "engineers" {
name = "Engineers"
sam_account_name = "engineers"
container = "ou=groups,dc=example,dc=com"
scope = "global"
category = "security"
}Full documentation is available in the docs/ directory and on the Terraform Registry.
If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).
make install # Build and install to $GOPATH/bin
make build # Build without installingmake test # Run unit tests
make testacc # Run acceptance tests (requires TF_ACC=1)For acceptance tests, configure the provider with environment variables:
export TF_ACC=1
export AD_DOMAIN=example.com
export AD_USERNAME=terraform
export AD_PASSWORD=secret
make testaccmake fmt # Format code with gofmt
make lint # Run golangci-lint
make generate # Generate documentation
make # Run all checks: fmt, lint, install, generateTo generate or update documentation:
make generateDocumentation is automatically generated from schema descriptions and examples using terraform-plugin-docs.
- Framework: terraform-plugin-framework v1.15.1 (NOT SDK v2)
- LDAP Library: github.com/go-ldap/ldap/v3 v3.4.11
- Kerberos Support: github.com/jcmturner/gokrb5/v8 v8.4.4
- Protocol: Terraform protocol version 6.0
See CLAUDE.md for comprehensive developer documentation and DESIGN.md for architecture details.
See LICENSE file for details.