我正在寻找一种方法来设置配额大小(例如,100GB)用于我使用 Azure ARM 模板部署的文件共享。截至目前,当我部署时,默认为 5TB,这并不理想。理想情况下,我只需在我的template.json 或 param.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": {}
}
答案1
用于创建文件共享的 ARM 资源支持使用 shareQuota 属性提供配额大小,该值以 GB 为单位。
{
"name": "string",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"apiVersion": "2019-04-01",
"properties": {
"shareQuota": "100"
}
}