File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11# - Users and Groups -
22locals {
33 # To support both managed and federated identities, let's combine the two user collections.
4- sso_users = merge (var. sso_users , var. existing_sso_users )
4+ sso_users = merge (coalesce ( var. sso_users , {}), coalesce ( var. existing_sso_users , {}) )
55
66 # Create a new local variable by flattening the complex type given in the local aggregated variable "sso_users"
77 flatten_user_data = flatten ([
8- for this_user in keys ( local. sso_users ) : [
9- for group in local . sso_users [ this_user ] . group_membership : {
10- user_name = local . sso_users [ this_user ] . user_name
8+ for this_user , user_data in local . sso_users : [
9+ for group in coalesce (user_data . group_membership , []) : {
10+ user_name = user_data . user_name
1111 group_name = group
1212 }
1313 ]
You can’t perform that action at this time.
0 commit comments