-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add support for deleting resources from multiple regions in AWS #19
Add support for deleting resources from multiple regions in AWS #19
Conversation
7583eb8
to
01405e3
Compare
settings.yaml.template
Outdated
@@ -22,5 +22,5 @@ PROVIDERS: | |||
EC2: | |||
USERNAME: | |||
PASSWORD: | |||
REGION: | |||
REGION: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to keep the same convention for all cloud providers. Currently, the REGION
is just a string. Now, it will be a string for Azure and GCP and an array of string for AWS.
What do you think about using REGION
for a single string and REGIONS
for an array? REGIONS
could throw an error something like 'Not yet supported for Azure/GCP' for cloud providers other than AWS. In the future, others can add such a support for Azure and GCP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your input @apodhrad
Since deleting resources from multiple regions is the objective I think an array for REGIONS
will be a good idea.
We can also add the same support for AZURE/GCP and handle the errors accordingly in the future.
OR
I can also create a new module which can have the Regions data and settings.yaml would then contain REGIONS
as Strings itself.
So users would also have to update that new module file with the regions they want the resources to be deleted which will be a new task in addition to updating settings.yaml
what do you think? @apodhrad , any views on this @jyejare
@shubhamsg199 Please rebase your PR with new merged PR #24 ! |
6ef5bbc
to
4bcc8a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The looping needs to take care of deleting the resources along with not showing those deleted resources from one region in another region for dry data. Same is impacting in VM deletion.
Also, I we can rename region
to plural regions
for all CRs and we can pass single, multiple regions or all
. In case of all
we will auto fetch list of regions from EC2Client.list_regions()
Ping @shubhamsg199 !!! |
5538692
to
15c354c
Compare
4eb3750
to
0baf46c
Compare
0baf46c
to
24ceaa0
Compare
24ceaa0
to
7b8ee13
Compare
Adding support for deleting resources from multiple regions in AWS.
list of regions
instead of a single regionOutput:
Issue: #12