Skip to content

Commit

Permalink
EN-1955 Remove region argument during AWSOrganization initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Moy committed Mar 31, 2023
1 parent 65e271f commit 5babe87
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions iambic/config/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,9 +745,10 @@ def configuration_wizard_aws_account_add(self): # noqa: C901
not self.config.aws.accounts and not self.config.aws.organizations
)
requires_sync = bool(
not is_hub_account and (
len(self.config.aws.accounts)
> self.config.aws.min_accounts_required_for_wildcard_included_accounts
not is_hub_account
and (
len(self.config.aws.accounts)
> self.config.aws.min_accounts_required_for_wildcard_included_accounts
)
)

Expand Down Expand Up @@ -850,9 +851,7 @@ def configuration_wizard_aws_account_add(self): # noqa: C901
account.hub_role_arn = get_hub_role_arn(account_id)
# account.partition = set_aws_account_partition(account.partition)

confirm_command_exe(
"AWS Account", Operation.ADDED, requires_sync=requires_sync
)
confirm_command_exe("AWS Account", Operation.ADDED, requires_sync=requires_sync)

self.config.aws.accounts.append(account)

Expand Down Expand Up @@ -1029,7 +1028,6 @@ def configuration_wizard_aws_organizations_add(self):
aws_org = AWSOrganization(
org_id=org_id,
org_account_id=account_id,
region=org_region,
default_rule=BaseAWSOrgRule(),
hub_role_arn=get_hub_role_arn(account_id),
aws_profile=profile_name,
Expand Down

0 comments on commit 5babe87

Please sign in to comment.