Fix redis-none.json hack
This commit is contained in:
Родитель
d6e6675437
Коммит
d2c1cfc15e
|
@ -626,6 +626,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"condition": "[parameters('redisDeploySwitch')]",
|
||||||
"type": "Microsoft.Resources/deployments",
|
"type": "Microsoft.Resources/deployments",
|
||||||
"apiVersion": "2017-05-10",
|
"apiVersion": "2017-05-10",
|
||||||
"name": "redisTemplate",
|
"name": "redisTemplate",
|
||||||
|
@ -643,7 +644,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"templateLink": {
|
"templateLink": {
|
||||||
"uri": "[concat(variables('moodleCommon').baseTemplateUrl,'redis', if(parameters('redisDeploySwitch'), '', '-none'), '.json',parameters('_artifactsLocationSasToken'))]"
|
"uri": "[concat(variables('moodleCommon').baseTemplateUrl, 'redis.json', parameters('_artifactsLocationSasToken'))]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -761,7 +762,7 @@
|
||||||
"value": "[reference('networkTemplate').outputs.ctlrPubIpId.value]"
|
"value": "[reference('networkTemplate').outputs.ctlrPubIpId.value]"
|
||||||
},
|
},
|
||||||
"redisKey": {
|
"redisKey": {
|
||||||
"value": "[reference('redisTemplate').outputs.redisKey.value]"
|
"value": "[if(parameters('redisDeploySwitch'), reference('redisTemplate').outputs.redisKey.value, 'None')]"
|
||||||
},
|
},
|
||||||
"azureSearchKey": {
|
"azureSearchKey": {
|
||||||
"value": "[if(equals(parameters('searchType'), 'azure'), reference('searchTemplate').outputs.azureSearchKey.value, 'None')]"
|
"value": "[if(equals(parameters('searchType'), 'azure'), reference('searchTemplate').outputs.azureSearchKey.value, 'None')]"
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
|
|
||||||
"contentVersion": "1.0.0.0",
|
|
||||||
"parameters": {
|
|
||||||
"moodleCommon": {
|
|
||||||
"metadata": {
|
|
||||||
"description": "Common Moodle values"
|
|
||||||
},
|
|
||||||
"type": "object"
|
|
||||||
},
|
|
||||||
"subnetIdRedis": {
|
|
||||||
"metadata": {
|
|
||||||
"description": "Azure resource ID of the subnet where this Redis instance is to be deployed"
|
|
||||||
},
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"resources": [
|
|
||||||
],
|
|
||||||
"variables": {
|
|
||||||
"documentation1": "This sub-template is a workaround to the ARM if(,,)'s eager/call-by-value limitation that prevents us",
|
|
||||||
"documentation2": "from using the if(,,) in case redisDeploySwitch is false (the listKeys() is still evaluated because of the eager semantics).",
|
|
||||||
"documentation3": "This just returns 'None' as its only output that matches the redis.json template."
|
|
||||||
},
|
|
||||||
"outputs": {
|
|
||||||
"redisKey": {
|
|
||||||
"value": "[if(parameters('moodleCommon').redisDeploySwitch, 'Impossible', 'None')]",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Загрузка…
Ссылка в новой задаче