Azure disk template issue.

Z_1826 41 Reputation points
2025-08-04T14:52:33.8333333+00:00

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>
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
0 comments No comments
{count} votes

Accepted answer
  1. TP 131.6K Reputation points Volunteer Moderator
    2025-08-04T14:59:59.3366667+00:00

    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

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.