gruntwork-io/cloud-nuke

Is it possible to exclude specific cluster like we have exclude-region?

Closed this issue · 4 comments

Description:

We wanted to exclude certain clusters while running cloud nuke. We see how to exclude regions and resource type. Is there any way to exclude cluster id's as well?

Hey @sreenusuuda, which cluster are you referring to? Can you elaborate on what you are trying to achieve with cloud-nuke? (e.g., your setup, resources you are trying to nuke)

Actually we are creating lot of Kubernetes clusters on our day to day activities. We are running cloud-nuke on regular basis to avoid cloud costs. We are currently nuking entire region which deletes all the available kubernetes clusters. Do we have any option to delete all the resources in the region excluding some clusters and its attached resouces?

eg: cloud-nuke aws --exclude-region --exclude-eks XYZ

Hey @sreenusuuda, have you tried using the config to exclude certain resources when nuking?

Here is an example and you can find more in the README file:

s3:
  exclude:
    names_regex:
      - ^alb-.*-access-logs$
      - .*-prod-alb-.*

Closing this issue as there has been no activity in this issue for some time.