Terraform Provider - Active Directory
This is a Terraform Provider to work with Active Directory.
This provider currently supports only computer objects, but more active directory resources are planned. Please feel free to contribute.
For general information about Terraform, visit the official website and the GitHub project page.
More information can be found on the Active Directory Provider GitHub pages.
Simple Usage Example
# Configure the AD Provider
provider "activedirectory" {
host = "ad.example.org"
domain = "example.org"
use_tls = false
user = "admin"
password = "password"
}
# Add computer to Active Directory
resource "activedirectory_computer" "test_computer" {
name = "TerraformComputer" # update will force destroy and new
ou = "CN=Computers,DC=example,DC=org" # can be updated
description = "terraform sample server" # can be updated
}
# Add ou to Active Directory
resource "activedirectory_ou" "test_ou" {
name = "TerraformOU" # can be updated
base_ou = "OU=Test,CN=Computers,DC=example,DC=org" # can be updated
description = "terraform sample ou" # can be updated
}