diff --git a/group-assignment/accounts.tf b/group-assignment/accounts.tf index 7bfc38e..47f16bd 100644 --- a/group-assignment/accounts.tf +++ b/group-assignment/accounts.tf @@ -12,7 +12,7 @@ locals { organizational_units = distinct(compact(concat(local._ou_1, local._ou_2))) - _id_3 = flatten([for k, v in data.aws_organizations_organizational_unit_descendant_accounts.ou : [for accounts in v : account.id if account.status == "ACTIVE"]]) + _id_3 = flatten([for k, v in data.aws_organizations_organizational_unit_descendant_accounts.ou : [for account in v.accounts : account.id if account.status == "ACTIVE"]]) account_ids = distinct(compact(concat(local._id_1, local._id_2, local._id_3))) }