Is there's a way to create a Table inside Azure Storage Account using ARM template? I can achieve that using PowerShell but can't find a way to do it using JSON template, also when I browse my deployment resources using (https://resources.azure.com) I can't see any reference to the created table under the storage account, any idea why?
Thanks, A Seyam
Azure Table storage is a cloud-based NoSQL datastore you can use to store large amounts of structured, non-relational data. Azure Table offers a schemaless design, which enables you to store a collection of entities in one table. An entity contains a set of properties, and each property defines a name-value pair.
You can create an Azure Storage account with a table via ARM like this, using a tableServices/tables
sub-resource on your storageAccount
resource:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountName": {
"type": "string",
"minLength": 3,
"maxLength": 24
},
"storageAccountSku": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
"Standard_RAGRS"
]
},
"tableName": {
"type": "string",
"minLength": 3,
"maxLength": 63
}
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[parameters('storageAccountName')]",
"apiVersion": "2019-06-01",
"location": "[resourceGroup().location]",
"kind": "StorageV2",
"sku": {
"name": "[parameters('storageAccountSku')]"
},
"resources": [
{
"name": "[concat('default/', parameters('tableName'))]",
"type": "tableServices/tables",
"apiVersion": "2019-06-01",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName'))]"
]
}
]
}
]
}
The functionality is documented on the ARM Template spec page for tableServices/tables.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With