Skip to content

Jqln/delete sg on destroy#20

Merged
jq-ln merged 8 commits intomainfrom
jqln/DeleteSGOnDestroy
Apr 2, 2025
Merged

Jqln/delete sg on destroy#20
jq-ln merged 8 commits intomainfrom
jqln/DeleteSGOnDestroy

Conversation

@jq-ln
Copy link
Copy Markdown
Contributor

@jq-ln jq-ln commented Apr 2, 2025

Does more than anticipated -- deletes all broker instances, IAM roles, and security groups in all regions upon destroy.

@jq-ln jq-ln requested a review from a team April 2, 2025 00:00
Copy link
Copy Markdown
Contributor

@larencozart larencozart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything tore down great!

One thing to consider is this line:

if (sg.GroupId && sg.GroupName?.toLowerCase().includes('rabbit')) { ids.push(sg.GroupId); }

I see you are deleting both the Rabbitory Control Panel security groups and all the Rabbitma instances' security groups by searching for the matching word "rabbit". While this does work for our use case, technically if our user might have a separate, unrelated security group named with the name "rabbit" in it.

This is just a small consideration. Not necessarily saying to change it. Just thought of that!

@jq-ln jq-ln merged commit 1ff993c into main Apr 2, 2025
3 checks passed
@jq-ln jq-ln deleted the jqln/DeleteSGOnDestroy branch April 2, 2025 20:00
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.

2 participants