Create a VM from a Windows Image with 4 Empty Data Disks

{"type": "microsoft.compute/availabilitysets", "name": "[variables('avsetnameascs')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "condition": "[equals(length(parameters('availabilityzones')), 0)]", "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 10}}{"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmnameascs'), "-", copyindex())]", "copy": {"name": "xscsvmloop", "count": "[variables('ascsvmcount')]"}, "dependson": ["nicascsloop", "[resourceid('microsoft.compute/availabilitysets", variables('avsetnameascs'))]"], "apiversion": "2020-06-01", "location": "[parameters('location')]", "zones": "[if(equals(length(parameters('availabilityzones')), 0), json('null'), array(variables('azarray')[mod(copyindex(), variables('azarraylength'))]))]", "properties": {"availabilityset": "[if(equals(variables('azarraylength'), 0), resourceid('microsoft.compute/availabilitysets", variables('avsetnameascs')), json('null'))]", "hardwareprofile": {"vmsize": "[variables('ascsvmsize')]"}, "osprofile": {"computername": "[concat(variables('vmnameascs'), "-", copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmnameascs'), "-", copyindex(), "-osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "datadisks": [{"lun": 0, "createoption": "empty", "disksizegb": 128}]}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('nicnameascs'), "-", copyindex()))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmnameascs'), "-", copyindex(), "/", variables('csextension')[variables('internalostype')].name)]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "dependson": ["xscsvmloop"], "copy": {"name": "xscsextvmloop", "count": "[variables('ascsvmcount')]"}, "properties": {"publisher": "[variables('csextension')[variables('internalostype')].publisher]", "type": "[variables('csextension')[variables('internalostype')].name]", "typehandlerversion": "[variables('csextension')[variables('internalostype')].version]", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('csextension')[variables('internalostype')].script]"], "commandtoexecute": "[concat(variables('csextension')[variables('internalostype')].scriptcall, " ", variables('scriptargumentsascsdi')[variables('internalostype')])]"}}}{"type": "microsoft.compute/availabilitysets", "name": "[variables('avsetnamedb')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "sku": {"name": "aligned"}, "condition": "[equals(length(parameters('availabilityzones')), 0)]", "properties": {"platformfaultdomaincount": 2, "platformupdatedomaincount": 10}}{"type": "microsoft.compute/virtualmachines", "name": "[concat(variables('vmnamedb'), "-", copyindex())]", "copy": {"name": "dbvmloop", "count": "[variables('dbvmcount')]"}, "dependson": ["nicdbloop", "[resourceid('microsoft.compute/availabilitysets", variables('avsetnamedb'))]"], "apiversion": "2020-06-01", "location": "[parameters('location')]", "zones": "[if(equals(length(parameters('availabilityzones')), 0), json('null'), array(variables('azarray')[mod(copyindex(), variables('azarraylength'))]))]", "properties": {"availabilityset": "[if(equals(variables('azarraylength'), 0), resourceid('microsoft.compute/availabilitysets", variables('avsetnamedb')), json('null'))]", "hardwareprofile": {"vmsize": "[variables('dbvmsize')]"}, "osprofile": {"computername": "[concat(variables('vmnamedb'), "-", copyindex())]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpasswordorkey')]", "linuxconfiguration": "[if(equals(parameters('authenticationtype'), "password'), json('null'), variables('linuxconfiguration'))]"}, "storageprofile": {"imagereference": {"publisher": "[variables('images')[parameters('ostype')].publisher]", "offer": "[variables('images')[parameters('ostype')].offer]", "sku": "[variables('images')[parameters('ostype')].sku]", "version": "latest"}, "osdisk": {"name": "[concat(variables('vmnamedb'), "-", copyindex(), "-osdisk')]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "premium_lrs"}}, "datadisks": "[variables('dbdisks')]"}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", concat(variables('nicnamedb'), "-", copyindex()))]"}]}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(variables('vmnamedb'), "-", copyindex(), "/", variables('csextension')[variables('internalostype')].name)]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "dependson": ["dbvmloop"], "copy": {"name": "dbextvmloop", "count": "[variables('dbvmcount')]"}, "properties": {"publisher": "[variables('csextension')[variables('internalostype')].publisher]", "type": "[variables('csextension')[variables('internalostype')].name]", "typehandlerversion": "[variables('csextension')[variables('internalostype')].version]", "autoupgrademinorversion": true, "settings": {"fileuris": ["[variables('csextension')[variables('internalostype')].script]"], "commandtoexecute": "[concat(variables('csextension')[variables('internalostype')].scriptcall, " ", variables('sizes')[parameters('sapsystemsize')][parameters('dbtype')].scriptarguments[variables('internalostype')])]"}}}