Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Sep 8, 2023
1 parent 20e5356 commit 85151bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion group-assignment/accounts.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ locals {
active_accounts_map = { for account in data.aws_organizations_organizational_unit_descendant_accounts.accounts.accounts : account.name => account if account.status == "ACTIVE" }
active_accounts = { for k, v in local.active_accounts_map : k => v.id }

_id_1 = ! local.org_all && length(local.account_names) > 0 ? [for k in local.account_names : lookup(local.active_accounts, k, null)] : []
_id_1 = ! local.org_all && length(local.org_account_names) > 0 ? [for k in local.org_account_names : lookup(local.active_accounts, k, null)] : []
_id_2 = ! local.org_all && length(local.org_account_ids) > 0 ? [for k in local.org_account_ids : k if contains(values(local.active_accounts), k)] : []

organizational_unit_hierarchy = length(var.organizational_unit_hierarchy) > 0 ? { for k, v in var.organizational_unit_hierarchy : k => v.self_id } : {}
Expand All @@ -29,3 +29,4 @@ data "aws_organizations_organizational_unit_descendant_accounts" "ou" {
for_each = toset(local.organizational_units)
parent_id = each.key
}

0 comments on commit 85151bd

Please sign in to comment.