DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Fix `dependsOn` for symbolic names

Open andyleejordan opened this issue 2 months ago • 1 comments

Looking at the ARM docs https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/resource-declaration#use-symbolic-name, I don't think you should just clobber the name with the symbolic name. Instead, looking at https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/resource-dependency, it appears that symbolic names can be used in dependsOn in addition to resourceId() in the classical sense. So I think what we may need to eventually (this can be a follow-up PR) do is maintain a list of symbolic names and for resolving dependencies allow for either symbolic name or resourceid().

For this PR, I would just change the TODO comment to reflect what I said above.

Originally posted by @SteveL-MSFT in https://github.com/PowerShell/DSC/pull/1210#discussion_r2466875002

andyleejordan avatar Oct 29 '25 18:10 andyleejordan

Yes, my understanding with 2.0 is that dependsOn() can take a symbolic name or resourceId().

SteveL-MSFT avatar Nov 01 '25 02:11 SteveL-MSFT