glamorous-printer-66548
09/14/2018, 9:55 PMparent
vs dependsOn
of another resource B? I’m currently just arguing whether I should make the k8s namespace of my app the parent or dependsOn of the resources inside the namespace.incalculable-sundown-82514
09/14/2018, 9:59 PMpulumi.ComponentResource
) that themselves are made up of resources - it’s not legal for a non-component resource (like a k8s namespace) to be the parent of any other resource. dependsOn
tells Pulumi that resource A can’t begin a CRUD operation until resource B completes its own CRUD operation, which is basically what you want for k8s namespaces. However, if you use the output property of the name of the namespace as an input property to another resource’s metadata.namespace
, you shouldn’t need to do dependsOn
at all - Pulumi should figure out that there’s a dependency on the resource you’re constructing and the k8s namespaceargs.namespace
here is a Namespace
resource that I just crated - I’m passing the name of the namespace to a ConfigMap’s metadata.namespace
here and Pulumi sets up a dependency between the two automaticallyglamorous-printer-66548
09/14/2018, 10:03 PMparent
of the other resources and it actually worked (like pulumi up created the appropriate resources etc.). Doesn’t that contradict what you said or is this a bug?incalculable-sundown-82514
09/14/2018, 10:06 PMparent
and I’m not sure where we ended up 😆 . @microscopic-florist-22719 would knowparents
glamorous-printer-66548
09/14/2018, 10:38 PMmicroscopic-florist-22719