diff --git a/ldap/data_source_resource_ldap_user.go b/ldap/data_source_resource_ldap_user.go index 5ecd535..e729663 100644 --- a/ldap/data_source_resource_ldap_user.go +++ b/ldap/data_source_resource_ldap_user.go @@ -25,24 +25,27 @@ func dataSourceLDAPUser() *schema.Resource { Required: true, }, "name": { - Description: "The name of the LDAP user.", - Type: schema.TypeString, - Required: true, + Description: "The name of the LDAP user.", + Type: schema.TypeString, + Optional: true, + AtLeastOneOf: []string{"name", "sam_account_name", "user_principal_name"}, }, "sam_account_name": { - Description: "The sAMAccountName of the LDAP user.", - Type: schema.TypeString, - Optional: true, + Description: "The sAMAccountName of the LDAP user.", + Type: schema.TypeString, + Optional: true, + AtLeastOneOf: []string{"name", "sam_account_name", "user_principal_name"}, }, "user_principal_name": { - Description: "The userPrincipalName of the LDAP user", - Type: schema.TypeString, - Optional: true, + Description: "The userPrincipalName of the LDAP user", + Type: schema.TypeString, + Optional: true, + AtLeastOneOf: []string{"name", "sam_account_name", "user_principal_name"}, }, "description": { Description: "Description attribute for the LDAP user.", Type: schema.TypeString, - Optional: true, + Computed: true, }, }, }