-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
CI AWS account: write scripts to clean used resources #26711
Comments
Pinging @elastic/integrations (Team:Integrations) |
There are few players in the game: cloud nuke - https://github.com/gruntwork-io/cloud-nuke |
Terraform state is archived by the jenkins pipeline. This could be used to discover resources created but not destroyed. Though this would mean to look through all the jobs that may create these scenarios, and won't work for removed jobs. |
Yeah, that's actually the reason, why I personally prefer to simplify the logic and just depend on the timestamp (old enough? nuke it please). I assume we need it for EC2 instances, DynamoDB databases, SQS queues, SNS topics. Is there anything else? Do we create also other resources? |
Good point!
S3 bucket also? |
The easy way is to tag everything created from the CI, then nuke everything with those tags every daily. If we add the tag |
Hi! We're labeling this issue as |
👍 |
@v1v is this on your radar? |
IIRC, all the bits and pieces regarding the tagging/labelling was done with: There is some automation in place to delete all the leftovers, @amannocci can you confirm if the automation is enabled to delete those resources when needed? Line 46 in 5d4d48c
|
Currently, only EC2 instances are handled by cloud-reaper. |
Would you mind raising an issue in our project, so we can prioritise it |
Hi! We're labeling this issue as |
This issue was addressed with internal tooling. |
The idea of this issue is to enable some scripting to remove/clean old resources that have been used during tests. We can't always trust Terraform that it will remove all resources. The process running "tf" or the entire CI machine may go down and these resources will stay forever.
Possible solutions:
Most likely we'll face same problem in elastic/integrations.
cc @jsoriano @kaiyan-sheng
The text was updated successfully, but these errors were encountered: