Skip to content

Commit

Permalink
Merge pull request #7 from vinelias/main
Browse files Browse the repository at this point in the history
Added account status filter to work only with ACTIVE accounts
  • Loading branch information
rogeriomartini authored Oct 18, 2024
2 parents 18e739f + 2038c33 commit 586487a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.0.2
v0.0.3
4 changes: 2 additions & 2 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ locals {
]))

org_accounts = [
for acc in data.aws_organizations_organizational_unit_descendant_accounts.org_accounts.accounts[*] : acc.id if acc.id != data.aws_organizations_organization.org.master_account_id
for acc in data.aws_organizations_organizational_unit_descendant_accounts.org_accounts.accounts[*] : acc.id if acc.status == "ACTIVE" && acc.id != data.aws_organizations_organization.org.master_account_id
]

org_ou_accounts = {
for ou in local.ps_ou_list : ou => flatten([
data.aws_organizations_organizational_unit_descendant_accounts.accounts_per_ou[ou].accounts[*].id
for acc in data.aws_organizations_organizational_unit_descendant_accounts.accounts_per_ou[ou].accounts[*] : acc.id if acc.status == "ACTIVE"
])
}

Expand Down

0 comments on commit 586487a

Please sign in to comment.