I was thinking to either define API version numbers it looks like I keep repeating in some template referenced in all of linked templates, but it looks as if I have trouble doing so and I'm not sure if this should be even possible let alone how to do it.
For instance, int azuredeploy-shared.json
I could do something like
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"variables": {
"apiVersion": {
"resources": { "deployments": "2015-01-01" }
}
}
}
and in azuredeploy.json
I could then use it like
resources": [
{
"name": "someResource",
"type": "Microsoft.Resources/deployments",
"apiVersion": "[variables('apiVersion').resources.deployments]",
The first stumbling block is there needs to be a resources
section. It makes me wonder if I reference a wrong schema or should one be referenced at all. If I create something I regard as dummy resources and provided this idea works, how should the azuredeploy.json
reference this file?
I could do something like "[concat(parameters('_artifactsLocation'), '/ProjectName/Templates/azuredeploy-shared-json', parameters('_artifactsLocationSasToken'))]"
but I don't know where or how and should it still work. So, working pointers appreciated in this regard. I did saw How to pass variables between templates - ARM json, but unfortunately I didn't understand how should it work and neither the linked Azure example.