Skip to content

Commit

Permalink
* 1.0.4 -- 2023-12-13
Browse files Browse the repository at this point in the history
  - add user_mapping to replace the mail address
  • Loading branch information
badra001 committed Dec 13, 2023
1 parent c81f55e commit 45df680
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@

* 1.0.3 -- 2023-12-12
- update to make ou list or ou ids work

* 1.0.4 -- 2023-12-13
- add user_mapping to replace the mail address
2 changes: 1 addition & 1 deletion common/version.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
locals {
_module_version = "1.0.3"
_module_version = "1.0.4"
}
1 change: 1 addition & 0 deletions group-assignment/sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ all: true
account_names: []
account_ids: []
org_ous: []
user_mapping: {}
users: []
3 changes: 2 additions & 1 deletion group-assignment/users.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ locals {
user_base_dn = "ou=People,o=U.S. Census Bureau,c=US"
ldap_user_attributes = { for k, v in data.ldap_object.users : k => { for kk, vv in v.attributes_json : kk => jsondecode(vv)[0] } }
users = length(local.settings) > 0 ? try(local.settings.users, []) : var.users
user_mapping = length(local.settings) > 0 ? try(local.settings.user_mapping, {}) : {}
}

data "ldap_object" "users" {
Expand All @@ -20,7 +21,7 @@ data "aws_identitystore_user" "users" {
alternate_identifier {
unique_attribute {
attribute_path = "UserName"
attribute_value = each.value
attribute_value = lookup(local.user_mapping, each.key, each.value)
}
}
}

0 comments on commit 45df680

Please sign in to comment.