This commit is contained in:
asift91 2020-07-06 11:54:48 +05:30
Родитель 2fe41f91c0
Коммит 418cce347a
3 изменённых файлов: 18 добавлений и 34 удалений

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

@ -910,6 +910,9 @@
"dbFQDN": {
"value": "[reference('dbTemplate').outputs.dbFQDN.value]"
},
"storageAccountName": {
"value": "[reference('storageAccountTemplate').outputs.storageAccountName.value]"
},
"storageAccountKey": {
"value": "[reference('storageAccountTemplate').outputs.storageAccountKey.value]"
},

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

@ -15,7 +15,7 @@
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2019-06-01",
"location": "[parameters('moodleCommon').location]",
"name": "[concat(parameters('moodleCommon').storageAccountName,'abs')]",
"name": "[variables('storageName')]",
"kind": "Storage",
"sku": {
"name": "[parameters('moodleCommon').storageAccountType]"
@ -46,7 +46,7 @@
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2019-06-01",
"location": "[parameters('moodleCommon').location]",
"name": "[parameters('moodleCommon').storageAccountName]",
"name": "[variables('storageName')]",
"kind": "[if(equals(parameters('moodleCommon').storageAccountType, 'Premium_LRS'), 'FileStorage', 'Storage')]",
"sku": {
"name": "[parameters('moodleCommon').storageAccountType]"
@ -74,48 +74,23 @@
"keySource": "Microsoft.Storage"
}
}
},
{
"condition": "[equals(parameters('moodleCommon').fileServerType, 'azurefiles')]",
"type": "Microsoft.Storage/storageAccounts/fileServices",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('moodleCommon').storageAccountName, '/default')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('moodleCommon').storageAccountName)]"
],
"sku": {
"name": "[parameters('moodleCommon').storageAccountType]"
},
"properties": {
"cors": {
"corsRules": []
}
}
},
{
"condition": "[equals(parameters('moodleCommon').fileServerType, 'azurefiles')]",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"apiVersion": "2019-06-01",
"name": "[concat(parameters('moodleCommon').storageAccountName, '/default/moodle')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/fileServices', parameters('moodleCommon').storageAccountName, 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('moodleCommon').storageAccountName)]"
],
"properties": {
"shareQuota": 1024
}
}
],
"variables": {
"documentation1": "This sub-template creates a storage account. It expects certain values in the 'common' datastructure.",
"documentation2": " storageAccountName - name of storage account",
"documentation3": " storageAccountType - type of storage account",
"storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts', parameters('moodleCommon').storageAccountName)]"
"storageName": "[concat(parameters('moodleCommon').storageAccountName,if(equals(parameters('moodleCommon').fileServerType, 'azurefiles'), '-af', '-naf'))]",
"storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageName'))]"
},
"outputs": {
"storageAccountKey": {
"value": "[listKeys(variables('storageAccountId'), '2019-06-01').keys[0].value]",
"type": "string"
},
"storageAccountName": {
"value": "[variables('storageName')]",
"type": "string"
}
}
}

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

@ -14,6 +14,12 @@
},
"type": "string"
},
"storageAccountName": {
"metadata": {
"description": "Storage account name from the storage account deployment."
},
"type": "string"
},
"storageAccountKey": {
"metadata": {
"description": "Storage account key from the storage account deployment."
@ -50,7 +56,7 @@
"dbUserAzure": "[parameters('moodleCommon').moodleDbUserAzure]",
"dbPassword": "[parameters('moodleCommon').moodleDbPass]",
"adminPassword": "[parameters('moodleCommon').moodleAdminPass]",
"storageAccountName": "[parameters('moodleCommon').storageAccountName]",
"storageAccountName": "[parameters('storageAccountName')]",
"storageAccountKey": "[parameters('storageAccountKey')]",
"redisDns": "[parameters('moodleCommon').redisDns]",
"redisKey": "[parameters('redisKey')]",