我正在寻找一种方法来为使用 Azure ARM 模板部署的文件共享设置配额大小(例如 100gb)。截至目前,当我部署它时,它默认为 5TB,这并不理想。理想情况下,我会在我的template.json 或 parameter.json 文件中添加一个设置来调整这个设置,但我还没有遇到任何事情。我将不胜感激任何帮助/指导。
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string"
},
"storageAccountName": {
"type": "string"
},
"fileShareName": {
"type": "string",
"minLength": 3,
"maxLength": 63
},
"fileShareName1": {
"type": "string",
"minLength": 3,
"maxLength": 63
},
"fileShareName2": {
"type": "string",
"minLength": 3,
"maxLength": 63
},
"accountType": {
"type": "string"
},
"kind": {
"type": "string"
},
"accessTier": {
"type": "string"
},
"supportsHttpsTrafficOnly": {
"type": "bool"
}
},
"variables": {},
"resources": [
{
"name": "[parameters('storageAccountName')]",
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2018-02-01",
"location": "[parameters('location')]",
"properties": {
"accessTier": "[parameters('accessTier')]",
"supportsHttpsTrafficOnly": "[parameters('supportsHttpsTrafficOnly')]"
},
"dependsOn": [],
"sku": {
"name": "[parameters('accountType')]"
},
"kind": "[parameters('kind')]",
"resources": [
{
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"apiVersion": "2019-04-01",
"properties": {
"shareQuota": "100"
},
"name": "[concat(parameters('storageAccountName'), '/default/', parameters('fileShareName'))]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName'))]"
]
},
{
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"apiVersion": "2019-04-01",
"properties": {
"shareQuota": "100"
},
"name": "[concat(parameters('storageAccountName'), '/default/', parameters('fileShareName1'))]",
"shareQuota": "100",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName'))]"
]
},
{
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"apiVersion": "2019-04-01",
"properties": {
"shareQuota": "100"
},
"name": "[concat(parameters('storageAccountName'), '/default/', parameters('fileShareName2'))]",
"shareQuota": "100",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName'))]"
]
}
]
}
],
"outputs": {}
}
用于创建文件共享的 ARM 资源支持使用 shareQuota 属性提供配额大小,该值以 GB 为单位。