pluralith-cli icon indicating copy to clipboard operation
pluralith-cli copied to clipboard

Add filter for resource types and/or providers

Open PeterBurner opened this issue 3 years ago • 3 comments

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

  • null_resource
  • archive_file
  • aws_caller_identity
  • aws_partition
  • external
  • local_file
  • time_sleep

PeterBurner avatar Dec 12 '22 12:12 PeterBurner

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?

DanThePutzer avatar Dec 14 '22 10:12 DanThePutzer

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.

PeterBurner avatar Dec 14 '22 11:12 PeterBurner

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.

DanThePutzer avatar Feb 07 '23 15:02 DanThePutzer