Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I do not see a child tag for ARM template / template spec. I have a disk template named disk 1. If I try to deploy a custom template based on the below I get the error displayed. Disk1 definitely exists, what could it be? Thanks
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"disks_disk1_name": {
"defaultValue": "disk1",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Compute/disks",
"apiVersion": "2025-01-02",
"name": "[parameters('disk1')]",
"location": "westeurope",
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"properties": {
"creationData": {
"createOption": "Empty"
},
"diskSizeGB": 32,
"diskIOPSReadWrite": 500,
"diskMBpsReadWrite": 60,
"encryption": {
"type": "EncryptionAtRestWithPlatformKey"
},
"networkAccessPolicy": "AllowAll",
"publicNetworkAccess": "Enabled",
"dataAccessAuthMode": "None"
}
}
]
}
Error:
code id='' style='white-space:pre-wrap'><div><div>Deployment template validation failed: 'The template parameter 'disk1' is not found. Please see <a target="_blank" class="msportalfx-ext-link" href="https://aka.ms/arm-syntax-parameters">https://aka.ms/arm-syntax-parameters</a> for usage details.'.</div></div></code>
Hi,
You don't have correct parameter name in resources section. Please try below:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"disks_disk1_name": {
"defaultValue": "disk1",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Compute/disks",
"apiVersion": "2025-01-02",
"name": "[parameters('disks_disk1_name')]",
"location": "westeurope",
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"properties": {
"creationData": {
"createOption": "Empty"
},
"diskSizeGB": 32,
"diskIOPSReadWrite": 500,
"diskMBpsReadWrite": 60,
"encryption": {
"type": "EncryptionAtRestWithPlatformKey"
},
"networkAccessPolicy": "AllowAll",
"publicNetworkAccess": "Enabled",
"dataAccessAuthMode": "None"
}
}
]
}
Please click Accept Answer and upvote if the above was helpful.
Thanks.
-TP