Hello all. When defining resources in Pulumi there...
# general
s
Hello all. When defining resources in Pulumi there is an option to specify a
parent
or a list of dependencies via
dependsOn
. Are there any best practices for using one or the other (or both)? E.g. if I want to deploy a GKE cluster I need to create a network and a subnet. Should I use
parent
or
dependsOn
in this scenario? Should the network be a parent of the subnet, and the subnet, in return, be a parent of the cluster? Or should the depend on each other? What is the difference between the two properties?
b
if you need to create a relationship between two resources, use
dependsOn
. Parent only applies to inheriting resources options, and outside of a component is primarily used for UI.
s
Thank you!