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

How to delete resources from all regions in AWS? #12

Closed
kornys opened this issue Apr 28, 2022 · 4 comments
Closed

How to delete resources from all regions in AWS? #12

kornys opened this issue Apr 28, 2022 · 4 comments
Assignees
Labels
RFE New Feature Request

Comments

@kornys
Copy link

kornys commented Apr 28, 2022

From configuration and brief check of source I don't see any chance how to clean resources across all regions in AWS. Also configuration allows only define one region for ec2 and the most weird part is username and password for ec2... AWS allows you to use api account with id and key so this tool should be able to reuse it.

@eduardocerqueira
Copy link

it is a good question @kornys, I was checking the code and I agree with you, it seems cloudwash is tied with only one AWS region at least on this code version. @jyejare is there any plan to extend the tool to manage resources from multiple regions?

@kornys
Copy link
Author

kornys commented May 3, 2022

boto3 client allows you after connecting into specific region list all regions so then you can iterate across regions and connect ec2 client to specific region and list instances. I expect that same approach can be used for other aws objects.

@jyejare
Copy link
Collaborator

jyejare commented May 3, 2022

@eduardocerqueira @kornys Since we have this issue open now, we will try to fix it up sooner depends on multiple priorities listed in the issues.

@kornys I would encourage you to step forward and contribute to fix the issue.

@jyejare
Copy link
Collaborator

jyejare commented Jul 25, 2022

@kornys @eduardocerqueira The recent PR #19 has merged adding support for multiple regions where you can either mention one region, multiple separated by comma or all string. The all fetches list of regions from EC2 and runs cleanup over all regions. The new release of cloudwash has this ability.

Also the username and password itself are nothing but aws_access_key_id and aws_secret_access_key resp, it is just that cloudwash is using the term username and passwrd from its dependency wrapanapi https://github.com/RedHatQE/wrapanapi/blob/master/wrapanapi/systems/ec2.py#L492-L493

If thats confusing things then we ll change that in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFE New Feature Request
Projects
None yet
Development

No branches or pull requests

3 participants