-
Notifications
You must be signed in to change notification settings - Fork 0
/
user-list.tf
39 lines (30 loc) · 1.07 KB
/
user-list.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
######################################
## KopiCloud AD API - List AD Users ##
######################################
# Get All AD Users
data "kopicloud_user_list" "test_all" { }
# Returns All AD Users
output "OUTPUT_kopicloud_all_users" {
description = "All Existing AD Users"
value = data.kopicloud_user_list.test_all
}
///////////////////////////////////
# Get All AD Users Inside an OU
data "kopicloud_user_list" "test_ou" {
ou_path = "LDAP://CN=API Service,CN=Managed Service Accounts,DC=kopicloud,DC=local"
}
# Returns All AD Users Inside an OU
output "OUTPUT_kopicloud_all_users_ou" {
description = "All Existing AD Users inside an OU"
value = data.kopicloud_user_list.test_ou
}
///////////////////////////////////
# Get All AD Users Showing Specific Fields
data "kopicloud_user_list" "test_filter" {
show_fields = "firstName,lastName,displayName"
}
# Returns all AD Users Showing Specific Fields
output "kopicloud_all_users_filter" {
description = "All Existing AD Users Showing Specific Fields"
value = data.kopicloud_user_list.test_filter
}