[
    {
        "name": "dataDisks",
        "count": "[length(parameters('dataDisks'))]",
        "input": {
            "lun": "[parameters('dataDisks')[copyIndex('dataDisks')].lun]",
            "createOption": "[parameters('dataDisks')[copyIndex('dataDisks')].createOption]",
            "caching": "[parameters('dataDisks')[copyIndex('dataDisks')].caching]",
            "writeAcceleratorEnabled": "[parameters('dataDisks')[copyIndex('dataDisks')].writeAcceleratorEnabled]",
            "diskSizeGB": "[parameters('dataDisks')[copyIndex('dataDisks')].diskSizeGB]",
            "managedDisk": {
                "id": "[coalesce(parameters('dataDisks')[copyIndex('dataDisks')].id, if(equals(parameters('dataDisks')[copyIndex('dataDisks')].name, json('null')), json('null'), resourceId('Microsoft.Compute/disks', parameters('dataDisks')[copyIndex('dataDisks')].name)))]",
                "storageAccountType": "[parameters('dataDisks')[copyIndex('dataDisks')].storageAccountType]"
            }
        }
    }
]

