pistazie / cdk-dia

Automated diagrams of CDK provisioned infrastructure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Add intent/purpose on edges based on the relationship between two nodes.

pistazie opened this issue · comments

Currently, cdk-dia edges provide no additional details about the intent/purpose/relationship between two nodes. They just connect them.

It could be useful to try and bring these details as text by the edges.

An example use case would be:new s3.Bucket(this,'my-bucket').grantRead(myLambdaFunction). In this case, the existing edge between the myLambdaFunction and my-bucket would have the text "reads" or something similar.

The implementation is tricky as cdk-dia does not parse the TS code, but instead creates the diagram based on the construct tree.

The edges are generated according to references between nodes/resources.

It should be possible to enrich those edges with details according to the IAM actions allowed by an IAM role in this case.

This issue was isolated from #9