Open mjj209 opened 5 years ago
@mjj209 That logic sounds great. I can't imagine a user passing a filter knowing it would match some network and not want to delete the things in that network. Would the team be able to make a PR with the current GCP objects they've updated to follow this logic and then we can see what other objects make sense after that?
@nmahoney-pivotal @rowanjacobs Any thing y'all want to add?
Hey @mjj209 @rowanjacobs! Are you still interested in merging this functionality upstream?
Hi @mjj209.
I was reviewing the point about record sets in a dns zone. If a dns zone contains the filter, leftovers does delete the record sets inside of it.
https://github.com/genevieve/leftovers/blob/46d59f734f8af7b3ee68e71b239939a554f3bf7f/gcp/dns/managed_zone.go#L20 https://github.com/genevieve/leftovers/blob/46d59f734f8af7b3ee68e71b239939a554f3bf7f/gcp/dns/record_sets.go#L27-L52
I'm curious under what cases you've seen this cause leftovers to fail to clean up the gcp dns zone.
Status:
The CF-Toolsmiths have implemented logic that cleans up GCP objects that don't match the explicit filter string. We wanted to recommend pushing this logic upstream into Leftovers. Would you consider cleaning up these GCP objects with Leftovers?
Specifically, we look for:
Any of the 4 objects listed above could cause Leftovers to fail. We've found that it's safe to delete these objects, even if they do not match the filter string. I think for some objects, such as VMs, Leftovers will delete all VMs that are attached to the network in question, even if the VM name does not contain the filter. I'm curious if you would want to add more GCP objects to have this same behavior?