In outputs of a template, allow to return the references of the created resources
For exemple : if the template creates multiple resources (for exemple : multiple virtual network card), it could be usefull to retrieve the references of the created resources for using it in parent templates.
Something like this
outputs {
resources : {
type : object,
value : "[this()]
}
}

We are working on supporting the copy() function in outputs – combined with the reference() function should help with these scenarios. We will email you once it is completed. Feel free to reach out if you have any additional feedback.
9 comments
-
Anonymous commented
Andy updates??? needed as well
-
Cake commented
It's 2020 and still no news on a rather needed feature.
Meanwhile doing more complex stuff with ARM ends up looking like spaghetti code due to having to hack pieces in order to make up functionality that is missing in ARM functionsAny updates?
-
Ayaz Gulmammadov commented
Any updates?
-
Agoney Garcia-Deniz commented
It would be good to have an ETA for this, even if rough
-
puvit commented
Has the copy function in outputs been implemented yet?
-
Greg Lloyd commented
I asked about this functionality during ignite and they mentioned that they want include this. Brian Moore did mention in his ignite session that you can do a reference() function within ARM can provide a resource. Hopefully this helps you, the link is below.
-
Vicky Perdana commented
This will be very useful for our project, for example if you create multiple VMs using the copy() method and wanted to return all IP's for every deployment.
-
Matthieu Klotz commented
In addition of this functionality, it could be cool to be able to iterate on resources for creating a custom json.
For exemple, looping on created NICs for creating the networkprofile object required for creating a virtual machine. -
Yoann commented
I’m looking for a way to setup properties of a resource within a loop. By using this I could set the loop creation of the resources in a linked template and retrieve the data I need to set the properties. This will bring a lot of flexibility to the ARM templates.