https://pulumi.com logo
Title
m

mysterious-australia-14256

07/13/2021, 6:11 PM
What is the correct way to handle dependencies when the parent object is created by a template? For example, I have used a template deployment to create a Web.CustomApi. This returns a Pulimi.AzureNative.Resources.Deployment object. I then want to create a Web.Connection that depends on the Web.CustomApi. Am I OK to specify the returned Deployment object of the Web.CustomApi in the DependsOn property of the CustomResourceOptions parameter when creating the Web.Connection or do I need to try and pull back a reference to the resource actually created by the Deployment?
c

cool-fireman-90027

07/13/2021, 6:14 PM
Does the dependsOn option help?
m

mysterious-australia-14256

07/13/2021, 6:28 PM
Thanks @cool-fireman-90027, The dependOn option is what I am using. I am just trying to work out whether it is OK to add a deployment object as the dependsOn resource or if there is a benefit to trying to pull back the underlying resource that was actually created by the deployment. Cheers
s

sparse-park-68967

07/13/2021, 10:45 PM
Depends on whether the deployment creation encapsulates the resources underneath it or not. I would expect it would but haven’t tried it.
👍 1