https://pulumi.com logo
#dotnet
Title
# dotnet
w

wet-noon-14291

03/01/2021, 10:06 PM
Is it possible to use a
CustomResource
as a dependency but it should only return created when one or more of the resources it wraps are done? Pseudo example:
Copy code
MyCustomResource: CustomResource {
   var resourceA = new A();
   var resourceB = new B();
   var resourceC = new C();
}

Deploy {
   var myResource = new MyCustomResource();
   var someOtherResournce = new SomeOtherResource({ dependsOn = [myResource]);
}
In the
dependsOn
there, is it possible to have that resource to delegate the check to one or more of resourceA, resourceB or resourceC? I think that is what causing one of our deploy to fail now since we "wrap" a kubernetes deployment, but the dependency is to our
CustomResource
and not to the actual deployment.
t

tall-needle-56640

03/09/2021, 5:14 PM
I think you'd want to use the ComponentResource.
👍 1
w

wet-noon-14291

03/10/2021, 10:26 AM
@tall-needle-56640, you're right and that is what we were using... just that type faster than I think it seems 🙂 I think the solution is to set parent relation on the childs.
👍 1