This commit is contained in:
Hosung Song 2018-05-11 14:46:16 -07:00
Родитель d6e6675437
Коммит d2c1cfc15e
2 изменённых файлов: 3 добавлений и 33 удалений

Просмотреть файл

@ -626,6 +626,7 @@
}
},
{
"condition": "[parameters('redisDeploySwitch')]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"name": "redisTemplate",
@ -643,7 +644,7 @@
}
},
"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]"
},
"redisKey": {
"value": "[reference('redisTemplate').outputs.redisKey.value]"
"value": "[if(parameters('redisDeploySwitch'), reference('redisTemplate').outputs.redisKey.value, 'None')]"
},
"azureSearchKey": {
"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"
}
}
}