-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpolicy_ldap.tf
More file actions
83 lines (72 loc) · 1.93 KB
/
Copy pathpolicy_ldap.tf
File metadata and controls
83 lines (72 loc) · 1.93 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
resource "intersight_iam_ldap_policy" "disabled" {
name = "disabled"
dynamic "tags" {
for_each = local.tags
content {
key = tags.key
value = tags.value
}
}
organization {
moid = local.organization
}
enabled = false
}
resource "intersight_iam_ldap_policy" "example" {
name = "example"
dynamic "tags" {
for_each = local.tags
content {
key = tags.key
value = tags.value
}
}
organization {
moid = local.organization
}
enabled = true
enable_dns = true
user_search_precedence = "LocalUserDb"
base_properties {
attribute = "CiscoAvPair"
base_dn = "DC=example,DC=com"
bind_dn = "CN=administrator,CN=Users,DC=example,DC=com"
bind_method = "Anonymous"
domain = "example.com"
enable_encryption = true
enable_group_authorization = true
filter = "sAMAccountName"
group_attribute = "memberOf"
nested_group_search_depth = 128
timeout = 180
}
dns_parameters {
nr_source = "Extracted"
}
}
## This data souce is defined in policy_local_user.tf instead of in this file.
## One place is not more right than the other, but it has to be somewhere.
##
## This data source retrieves a system built-in role that we want to assign to the admin user.
# data "intersight_iam_end_point_role" "imc_admin" {
# name = "admin"
# role_type = "endpoint-admin"
# type = "IMC"
# }
resource "intersight_iam_ldap_group" "ucs_admin" {
name = "ucs_admin"
dynamic "tags" {
for_each = local.tags
content {
key = tags.key
value = tags.value
}
}
domain = "example.com"
end_point_role {
moid = data.intersight_iam_end_point_role.imc_admin.results[0].moid
}
ldap_policy {
moid = intersight_iam_ldap_policy.example.moid
}
}