diff --git a/docs/data-sources/group.md b/docs/data-sources/group.md index a68ec3c..8fa0f10 100644 --- a/docs/data-sources/group.md +++ b/docs/data-sources/group.md @@ -15,7 +15,7 @@ data "ldap_group" "group" { * `name` - (Required) LDAP group name. * `ou` - (Required) OU where LDAP group will be search. -* `scope` - (Optional) LDAP search scope (1: BaseObject, 2: SingleLevel, 3: WholeSubtree) Defaults to `0`. +* `scope` - (Optional) LDAP search scope (0: BaseObject, 1: SingleLevel, 2: WholeSubtree) Defaults to `0`. ## Attribute Reference diff --git a/docs/resources/group.md b/docs/resources/group.md index b15f1ee..b27fbb3 100644 --- a/docs/resources/group.md +++ b/docs/resources/group.md @@ -19,11 +19,11 @@ resource "ldap_group" "group" { * `name` - (Required) LDAP group name. * `members` - (Optional) LDAP group members. Defaults to `[]`. * `description` - (Optional) Description attribute for the LDAP group. Defaults to empty. +* `group_type` - (Optional, Computed) Type of the group. ## Attribute Reference * `id` - The DN of the LDAP group. -* `group_type` - Type of the group. ## Import diff --git a/go.mod b/go.mod index 7568794..e8cfcd5 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/Ouest-France/terraform-provider-ldap go 1.18 require ( - github.com/Ouest-France/goldap v0.6.0 + github.com/Ouest-France/goldap v0.6.1 github.com/go-ldap/ldap/v3 v3.4.3 github.com/hashicorp/terraform-plugin-sdk/v2 v2.16.0 ) diff --git a/go.sum b/go.sum index beb87a1..dd1e6c1 100644 --- a/go.sum +++ b/go.sum @@ -3,8 +3,8 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT github.com/Azure/go-ntlmssp v0.0.0-20211209120228-48547f28849e h1:ZU22z/2YRFLyf/P4ZwUYSdNCWsMEI0VeyrFoI2rAhJQ= github.com/Azure/go-ntlmssp v0.0.0-20211209120228-48547f28849e/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Ouest-France/goldap v0.6.0 h1:dWBLGUwKa7H3e9WHidUqzeQo85UNo6pGHqnKA5Q1KdA= -github.com/Ouest-France/goldap v0.6.0/go.mod h1:HekerH+zN6sfJbhlK7UvWMSLP4lOtccjCDOofKahT5A= +github.com/Ouest-France/goldap v0.6.1 h1:qMLkRd/CT69rTnP+izTWHyv6z9gJd/IOhXQCh2J5kkw= +github.com/Ouest-France/goldap v0.6.1/go.mod h1:HekerH+zN6sfJbhlK7UvWMSLP4lOtccjCDOofKahT5A= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= diff --git a/ldap/resource_ldap_group.go b/ldap/resource_ldap_group.go index 70f5810..3bf2585 100644 --- a/ldap/resource_ldap_group.go +++ b/ldap/resource_ldap_group.go @@ -74,7 +74,7 @@ func resourceLDAPGroupCreate(ctx context.Context, d *schema.ResourceData, m inte members = append(members, member.(string)) } - err := client.CreateGroup(dn, d.Get("name").(string), d.Get("description").(string), members) + err := client.CreateGroup(dn, d.Get("name").(string), d.Get("description").(string), d.Get("group_type").(string), members) if err != nil { return diag.FromErr(err) }