Skip to content

Commit

Permalink
Fix: Enable granting access for duplicate roles on auth module (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
morgante authored May 27, 2020
1 parent c80e1a4 commit ade8d3f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion modules/authorization/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
*/

locals {
roles = { for role in var.roles : role["role"] => role }
role_keys = [
for role in var.roles :
join("_", compact([
role["role"],
lookup(role, "domain", null),
lookup(role, "group_by_email", null),
lookup(role, "user_by_email", null),
lookup(role, "special_group", null)
]))
]
roles = zipmap(local.role_keys, var.roles)
views = { for view in var.authorized_views : "${view["project_id"]}_${view["dataset_id"]}_${view["table_id"]}" => view }

iam_to_primitive = {
Expand Down

0 comments on commit ade8d3f

Please sign in to comment.