We already know how to use the copy feature of the ARM templates to loop and create resources. Azure provides the capability to use even the copy features in the variables as well.
The variables defined within the variables section of the ARM templates are static in their count. If you define five variables, you get just five variables. Earlier, there was no way to have a dynamic number of variables during deployment. Adding copy into the variables helps with achieving defined variables at runtime and using them in ARM templates.
There are two distinct ways to use the copy element within the variables section. The first one generates a JSON object containing an array, while the other generates an array. ...