Allow usage of function arrays in the dependsOn section
The dependsOn section needs an array of strings, and each string added can call some functions like resourceId, parameters, and variables. But it does not accept a parameter or variable that contains an array of strings. It also doesn't allow the use of copy.
Allowing this would make it much easier (actually make it possible) to dynamically generate a list of dependencies based on parameters.
For instance, creating alerts links to action group resources. It is very likely that the action groups to use are given as a parameter (array of strings). Converting those strings to resourceIds (multiple) is easy using the copy feature in variables, creating an array of resourceId strings. However, using this variable in the dependsOn section fails as it doesn't allow the use of anything but strings. It should however accept an array of strings.
Thanks for the valid suggestion. Your feedback is now open for the user community to upvote which allows us to effectively prioritize your request against our existing feature backlog and also gives us insight into the potential impact of implementing the suggested feature.
Yvan Duhamel commented
Here is my scenario that is not possible if this feature is not implemented:
I cannot make creation of resource 'Microsoft.Network/publicIPAddresses' optional, because in resource 'Microsoft.Network/networkInterfaces', I cannot make the dependency to this public IP conditional.