Skip to content

Detect and scan all active (opted-in) regions if no region list is provided - #164

Merged
tyler-dunkel merged 1 commit into
cloudgraphdev:alphafrom
rbclark:detect-active-regions
Nov 8, 2023
Merged

tyler-dunkel merged 1 commit into
cloudgraphdev:alphafrom
rbclark:detect-active-regions

Conversation

@rbclark

@rbclark rbclark commented Sep 26, 2023

Copy link
Copy Markdown

Changes/solution

There are multiple regions in AWS that are opt in and not enabled by default. Attempting to scan these regions just slows things down. This adds an active region check which runs when no region list is provided. This also updates the init script to not create an entry at all for 'regions' in the config file if the user doesn't select any regions (which causes the region detection code to run).

Testing

I have run this locally against a test account after removing the region configuration from my config file and can verify that non-opted-in regions were not scanned.

Notes and considerations

After these changes it didn't really make sense to setup the regions at the global level, so I moved them to a per-account level.

There is one completely different approach I could've taken here, I could've made this code automatically filter out any regions that the user may have enabled that are not opted into. If desired I can update these changes to use that approach instead.

Dependencies

N/A

@rbclark rbclark changed the title Detect and scan active regions if no region list is provided Detect and scan all active (opted-in) regions if no region list is provided Sep 26, 2023
@tyler-dunkel

Copy link
Copy Markdown
Contributor

@rbclark thank you so much for the PR! @m-pizarro can you please review this when you get a chance?

@m-pizarro

Copy link
Copy Markdown
Contributor

@rbclark thank you so much for the PR! @m-pizarro can you please review this when you get a chance?

@tyler-dunkel I've been reviewing and doing some tests. It looks good to me. Thanks you @rbclark for it!

@tyler-dunkel
tyler-dunkel merged commit 19c75b0 into cloudgraphdev:alpha Nov 8, 2023
@rbclark
rbclark deleted the detect-active-regions branch November 8, 2023 17:39
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.

3 participants