This message was deleted.
# general
s
This message was deleted.
e
Pulumi should delete in the opposite order to the dependencies we see between resources. We see most dependencies via the use of Outputs (e.g. if you pass resourceA.Id of type Output<int> to a property of resourceB we should record a dependency there). If Outputs aren't capturing the correct dependency information you can also use the ResourceOption "dependsOn" to pass extra dependency information (https://www.pulumi.com/docs/intro/concepts/resources/#dependson) so add the NodeTemplate as a dependency of the Node and it should no longer try to delete the template until it's deleted the node.
m
Yes, I found a workaround exactly by setting
dependsOn
.. Probably this is something that the provider should be doing automatically.. but it is good enough as it is now. Thanks a lot!
e
If you could ping us some code of how your creating the node and nodetemplate we could take more of a look into why the system didn't infer this automatically.
Either here or raise an issue on github
m
the same as in here.. but using the new API
I am now doing
Copy code
// Create cluster
    const cluster = new rancher2.Cluster(this.name, cluster_args, {
      provider: this.rancher.localAdmin,
      dependsOn: Array.from(this.rancher.nodeTemplates.values()),
    });
and it works
e
Thanks will take a look