Azure
設置 Azure FileShare 大小 - ARM 模板
我正在尋找一種方法來為使用 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 為單位。
{ "name": "string", "type": "Microsoft.Storage/storageAccounts/fileServices/shares", "apiVersion": "2019-04-01", "properties": { "shareQuota": "100" } }