I have to deploy 2 resources and I have an ARM Template as follows:
Template.json
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-05-01",
"name": "Resource1",
"properties": {
"templateLink": {
"uri": "Test.json"
},
"parameters": {
"secretA": { "value": "" },
"secretB": { "value": "" }
}
}
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-05-01",
"name": "Resource2",
"properties": {
"templateLink": {
"uri": "Test.json"
},
"parameters": {
"secretC": { "value": "" },
"secretD": { "value": "" },
"secretE": { "value": "" }
}
}
}
Test.json looks as follows:
Test.json
"resources":
{
"apiVersion": "2018-02-01",
"type": "Microsoft.Web/sites",
"name": "",
"properties": {
"appSettings": {
//set secrets in this section
}
}
I need to set (i) secretA, secretB in appSettings for Resource1 (ii) secretC, secretD, secretE in appsettings for Resource2.
How do I update the above ARM templates to deploy both Resource1 and Resource2 with correct secrets in appSettings?
eg:
Resource1 appSettings should look like this:
"appSettings": {
{
"name": "secretA",
"value": ""
},
{
"name": "secretB",
"value": ""
}
}
Resource2 appSettings should look like this:
"appSettings": {
{
"name": "secretC",
"value": ""
},
{
"name": "secretD",
"value": ""
},
{
"name": "secretE",
"value": ""
}
}