File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
modules/service-deployment Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ data "aws_organizations_organizational_unit_descendant_accounts" "target_account
44 parent_id = each. key
55}
66
7+ locals {
8+ ram_target_accounts = try (flatten (values (data. aws_organizations_organizational_unit_descendant_accounts . target_accounts )[* ]. accounts [* ]), [])
9+ ram_target_account_ids = [for a in local . ram_target_accounts : a . id if a . state == " ACTIVE" ]
10+ }
11+
712#
813# Module for deploying AWS Backup resources in a specific region.
914#
@@ -50,7 +55,7 @@ module "region" {
5055 ram = {
5156 create_lag_shares = local.create_lag_shares
5257 lag_share_name = local.lag_share_name
53- target_account_ids = try ( flatten ( values (data . aws_organizations_organizational_unit_descendant_accounts . target_accounts )[ * ] . accounts [ * ] . id ), [])
58+ target_account_ids = local.ram_target_account_ids
5459 }
5560 stepfunctions = {
5661 ingest_state_machine_name = local.ingest_state_machine_name
You can’t perform that action at this time.
0 commit comments