Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

resource-types exclude/include in config not working #170

Closed
lobeck opened this issue Mar 26, 2018 · 2 comments
Closed

resource-types exclude/include in config not working #170

lobeck opened this issue Mar 26, 2018 · 2 comments
Labels
kind/bug Something isn't working

Comments

@lobeck
Copy link
Contributor

lobeck commented Mar 26, 2018

adding a include or exclude filter via resource-types in the config file seems to have no effect.

resources are checked and removed anyway.

example config:

resource-types:
  include:
  - foo
  exclude:
  - S3Bucket

i've added a printf after the yaml.Unmarshal in config.go and the returned values are empty:

ResourceTypes:{Targets:[] Excludes:[]}}] ResourceTypes:{Targets:[] Excludes:[]}

I guess this is caused because types.Collection is used for these values and there seems to be no custom unmarshaler for this type.

@svenwltr svenwltr added the kind/bug Something isn't working label Mar 27, 2018
@svenwltr svenwltr mentioned this issue Mar 27, 2018
@svenwltr
Copy link
Member

It actually is excludes and targets. Where did you get the names from? I found one occurrence of exclude and fix it in #171.

Another issue is that aws-nuke should print an error when there is an unknown config field.

@lobeck
Copy link
Contributor Author

lobeck commented Mar 27, 2018

Another issue is that aws-nuke should print an error when there is an unknown config field.

Afaik Unmarshal will just ignore them, but UnmarshalStrict should bring the desired behaviour.

svenwltr added a commit that referenced this issue Mar 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants