Is it possible to use a `CustomResource` as a depe...
# dotnet
w
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
I think you'd want to use the ComponentResource.
👍 1
w
@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