Skip to content

Cleaning up resources that don't match the filter #80

@mjj209

Description

@mjj209

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:

  1. Any Addresses attached to the network matching the filter
  2. Any routes attached to the network matching the filter
  3. Any DNS Record sets inside of the top level DNS zone matching the filter
  4. Any Firewall rules attached to the network matching the filter

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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions