I'm creating an Azure Resource Template and I'd like to assign the same set of tags to all my resources. I can create a variable to hold all my tag values like this:
"variables": { "mytags": { "project": "XyzProject", "department": "AbcDept", "owner": "Tom" } }
And I can assign all the tags values individually like
"tags": { "project": "[variables('mytags').project]" "department": "[variables('mytags').department]" "owner": "[variables('mytags').owner]" }
but (a) I have to repeat this for every resource and (b) if I add a new name-value pair to the tags I have to modify the tags element in every resource.
Is it possible to assign the whole of "mytags" at once?
Something like
"tags": variables('mytags')