Skip to content

Commit

Permalink
Fix 0-bootstrap iam_by_principals not taking into account all principals
Browse files Browse the repository at this point in the history
  • Loading branch information
wiktorn committed May 12, 2024
1 parent 35a17a4 commit 71d9858
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions fast/stages/0-bootstrap/organization.tf
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,14 @@ module "organization" {
organization_id = module.organization-logging.id
# human (groups) IAM bindings
iam_by_principals = {
for k, v in local.iam_principals :
k => distinct(concat(v, lookup(var.iam_by_principals, k, [])))
for key in distinct(concat(
keys(local.iam_principals),
keys(var.iam_by_principals),
)) :
key => distinct(concat(
lookup(local.iam_principals, key, []),
lookup(var.iam_by_principals, key, []),
))
}
# machine (service accounts) IAM bindings
iam = merge(
Expand Down

0 comments on commit 71d9858

Please sign in to comment.