Hello, in the pulumi dashboard, all the resources ...
# general
c
Hello, in the pulumi dashboard, all the resources in the Graph view are shown right next to each other instead of showing the correct dependencies as shown in the screenshot. My resource do depend on each other via outputs. Am I missing something? Do I need to mention
dependsOn
or
parent
manually to get a more correct graph to show?
l
dependsOn
relationships & input/output relations are not displayed in this graph. What you see are
parent
relationships. All resources have the stack resource implicitly as their parent. If you have components in between, you will see these visualized as intermediate nodes.
c
Right, I understand how it could be useful like when creating AKS cluster. Would it be possible to also have the dependency graph like the one generated from
pulumi stack graph
? I don't think the cloud dashboard is open source else I would have tried to contribute myself
g
As a general rule, @limited-rainbow-51650 ought we to be using
parent
instead of
dependsOn
?
c
@gifted-gigabyte-53859 I believe they are used for different purposes.
parent
is used with component resources https://www.pulumi.com/docs/concepts/options/parent/
dependsOn
is for inter-resource dependency
l
As @cuddly-engineer-30016 said regarding
parent
and
dependsOn
. I want to add to that: use
dependsOn
scarcely. If you pass an output from one resource as input to another, then Pulumi knows there is a dependency. No need to add an additional
dependsOn
at that time.