I'm looking for a way to set the quota size (ex, 100gb) for the file share I am deploying using Azure ARM Templates. As of now when I deploy it defaults to 5TB which is not ideal. Ideally I would just add a setting to my template.json or parameter.json files that would adjust this setting but I haven't come across anything yet. I'd appreciate any help/guidance on this.
{
"$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": {}
}
The ARM resource for creating file shares supports providing a quota size using the shareQuota property, this value is in GB.