Releases: trevex/terraform-provider-ldap
Releases · trevex/terraform-provider-ldap
v0.5.4
v0.5.3
v0.5.2
v0.5.1
v0.5.0
v0.4.0
Improvements and bugfixes:
- Add select_attributes and skip_attributes to the data source so they aren't super noisy when doing a terraform plan. This is more a convenience function than anything. However, same rules apply: if you skip_attributes an attribute then it won't be readable from the data source. @oliverisaac
- Also fixed a bug where terraform would give nil to the attribute hasher which would cause a panic. I could not figure out why terraform was sending nil to the attribute hasher, but, if it does, then we'll default to 0 rather than panicing. @oliverisaac
Due to human error and some erroneous releases in the >v0.3.1 range. This release is promoted to a minor release to avoid issues.
v0.3.0
- data resource type to the provider so one can read objects @oliverisaac (example below)
variable "users" {
type = set(string)
default = [
"oisaac",
"auser"
]
}
data "ldap_object" "user" {
for_each = var.users
base_dn = "OU=Users,OU=Example,DC=ad,DC=example,DC=com"
search_values = {
sAMAccountName = each.key
}
}
resource "ldap_object" "group" {
dn = "CN=test-terraform,OU=Groups,OU=Example,DC=ad,DC=example,DC=com"
object_classes = [
"top",
"group",
]
attributes = [for u in var.users : { "member" = data.ldap_object.user[u].dn }]
select_attributes = [
"member"
]
}
// You also get access to attributes as a JSON encoded array which could be helpful
output "json_vals" {
value = jsondecode(data.ldap_object.user["oisaac"].attributes_json["memberOf"])[0]
}