Share via

ARM bad request error - Failed dataDisk.managedDisk.id is not allowed

Kaustubh Patil 6 Reputation points
2022-02-11T01:33:50.757+00:00

Hi,

I am using ARM template to deploy a service fabric cluster with a data disk. Following the configuration for the data disk that I have -

            "storageProfile": {  
                "imageReference": {  
                    "publisher": "[parameters('vmImagePublisher')]",  
                    "offer": "[parameters('vmImageOffer')]",  
                    "sku": "[parameters('vmImageSku')]",  
                    "version": "[parameters('vmImageVersion')]"  
                },  
                "osDisk": {  
                    "caching": "ReadOnly",  
                    "createOption": "FromImage",  
                    "managedDisk": {  
                        "storageAccountType": "[parameters('storageAccountType')]"  
                    }  
                },  
                "dataDisks": [  
                    {  
                        "diskSizeGB": 1024,  
                        "lun": 0,  
                        "createOption": "Attach",  
                        "managedDisk": {  
                            "id": "[resourceId('Microsoft.Compute/disks', 'disk1')]"  
                        }  
                    }  
                ]  
            }  

On deploying it throws the following error:

   {  
       "status": "Failed",  
       "error": {  
           "code": "InvalidParameter",  
           "target": "dataDisk.managedDisk.id",  
           "message": "Parameter 'dataDisk.managedDisk.id' is not allowed."  
       }  
   }  

The documentation for ARM template does support the above. Here is the link [Manged Disk Parameters] (https://learn.microsoft.com/en-us/azure/templates/microsoft.compute/virtualmachines?tabs=json#manageddiskparameters)

What am I missing? Why does it throw invalid error?

Note - Also, tagging it as Azure managed disks. There are no tags related to Azure resource manager templates. It was not listing any at least.

Azure Service Fabric
Azure Service Fabric

An Azure service that is used to develop microservices and orchestrate containers on Windows and Linux.

Azure Disk Storage
Azure Disk Storage

A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.


1 answer

Sort by: Most helpful
  1. Prrudram-MSFT 28,506 Reputation points Moderator
    2022-02-22T21:06:38.433+00:00

    Hello @Kaustubh Patil ,

    I see your question is more in the context of SF, can you please check this document here for Create a Service Fabric cluster with attached data disks
    virtual-machine-scale-sets-attached-disks

    Also, there is a huge bank of templates here aswell https://github.com/Azure-Samples/service-fabric-cluster-templates.
    Please go through.

    Please "Accept as Answer" and Upvote if any of the above helped to help others in the community looking for remediation for similar issues.

    Was this answer helpful?

    0 comments No comments

Your answer

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