Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Add pagination to IAMUser and IAMGroup modules #985

Merged
merged 1 commit into from
May 22, 2023

Conversation

sstoops
Copy link
Contributor

@sstoops sstoops commented Apr 26, 2023

As reported in #981, the IAMUser and IAMGroup modules did not paginate their queries and thus only fetched and removed the first 100 of each resource type.

This PR adds pagination support to ensure AWS Nuke will clean up more than the default 100 limit.

Fixes #981

Testing

Create a set of resources with the following:

for i in {1..150}
do
   aws iam create-user --user-name "user$i"
   aws iam create-group --group-name "group$i"
done

Run AWS Nuke using the IAMUser and IAMGroup resource types. It should print out that it found 150 of each type and proceed to remove them.

@sstoops sstoops requested a review from a team as a code owner April 26, 2023 21:33
@der-eismann der-eismann merged commit 681db10 into rebuy-de:main May 22, 2023
@sstoops sstoops deleted the iam-user-group-pagination branch May 24, 2023 19:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG with IAMUser resource module
4 participants