Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS: don't process the management account twice #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

msusta
Copy link

@msusta msusta commented Jul 15, 2024

There's already a block for processing the management account at https://github.com/Qualys/totalcloud_resource_counter/blob/main/aws/aws-resource-counter.py#L343.

The current code will ask for account list from Org at https://github.com/Qualys/totalcloud_resource_counter/blob/main/aws/aws-resource-counter.py#L410, however that will also receive the id of the "management account" aka the root of the Organization. As they are not usually set up with the OrganizationAccountAccessRole it will lead to error in logs.
Even if it didn't, it's not really useful to count the same account twice.

There's already a block for processing the management account. The
Organizations call for listing accounts will however list also the
top-level "root" account. They however don't have the
OrganizationAccountAccessRole set up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant