Pluralith / pluralith-cli

A tool for Terraform state visualisation and automated generation of infrastructure documentation
https://www.pluralith.com
Mozilla Public License 2.0
787 stars 54 forks source link

Add filter for resource types and/or providers #92

Open PeterBurner opened 1 year ago

PeterBurner commented 1 year ago

Description

We are often working with null_resources or archive_files. For developers it makes sense that they are shown in the graph. However for presentations/reports it would be great if we could filter out certain resource types, data blocks and/or providers. Having them in the graph leads to confusion when talking to customers and other stakeholders.

Examples

DanThePutzer commented 1 year ago

Hi @PeterBurner thanks for opening up an issue!

We've heard a request for something like this a few times already and it does make a lot of sense. Thinking about how we could ship this as fast as possible, we could probably add another item to the pluralith.yml config file that lets users specify a list of resource types (like the ones you listed for example) to be ignored on diagram generation. Would that suffice for your use case?

PeterBurner commented 1 year ago

It would be nice if the implementation could be as flexible as possible here. I would add two properties: One to hide all entries of a specific provider (e.g. time) and one to hide entries by path with wildcard support (e.g. data.*, module.context.*, *.null_resource.archive, ...). One should be able to have a wildcard at any position in the path filter.

DanThePutzer commented 1 year ago

Those sound like good suggestions. @PhiWeber have a look at this, I think this would be good to implement with the new user input feature.