This message was deleted.
# general
s
This message was deleted.
l
I use it mainly when bundling resources in a
CustomResource
subclass. The
parent
relationship is visualized in the Resource Viewer on the Pulumi hosted platform (app.pulumi.com)
g
The parent also affects the resolution of which provider to use for its children resources
s
I used it for bundling resources, but I noticed dependency track does not seem to work properly when using them.
when dependencies are wrong I noticed a myriad of problems that derive from this, ultimately including broken stacks.
I see if I can create a minimal example that reproduces what I am experiencing
g
Hum, never had any problems like that. I used
parent
multiple times across multiple resources, mostly to put thing under custom `ComponentResource`s that define providers. Keeps things organized in the code, the resource viewer and reuses code without having to pass multiple providers everywhere. Essentially I do this:
Copy code
export class ProjectDefinition extends pulumi.ComponentResource {
  constructor(name, args, opts) {
    /// Instantiate the provider
    const provider = ...
    super('custom:utils:projectDefinition', name, args, {...opts, provider})
  }
}
s
yes, thats what I do, but the problem is when I have a CustomResource A and then another CustomResource B that depends on A. In some situation B is being populated before A has completed, leading to errors.