https://pulumi.com logo
#general
Title
# general
c

cuddly-engineer-30016

03/27/2024, 4:44 PM
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

limited-rainbow-51650

03/27/2024, 6:05 PM
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

cuddly-engineer-30016

03/28/2024, 7:02 AM
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

gifted-gigabyte-53859

04/04/2024, 6:35 AM
As a general rule, @limited-rainbow-51650 ought we to be using
parent
instead of
dependsOn
?
c

cuddly-engineer-30016

04/04/2024, 7:04 AM
@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

limited-rainbow-51650

04/04/2024, 7:14 AM
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.