This template deploys a VM Scale Set into an exsisting vnet.
{"type": "microsoft.compute/virtualmachinescalesets", "name": "[parameters('vmssname')]", "location": "[parameters('location')]", "apiversion": "2020-12-01", "sku": {"name": "[parameters('vmsku')]", "capacity": "[parameters('instancecount')]"}, "properties": {"overprovision": false, "upgradepolicy": {"mode": "manual"}, "virtualmachineprofile": {"storageprofile": {"osdisk": {"createoption": "fromimage", "caching": "readwrite"}, "imagereference": {"publisher": "microsoftwindowsserver", "offer": "windowsserver", "sku": "2016-datacenter", "version": "latest"}}, "osprofile": {"computernameprefix": "[parameters('vmssname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "networkprofile": {"networkinterfaceconfigurations": [{"name": "nic", "properties": {"primary": true, "ipconfigurations": [{"name": "ipconfig", "properties": {"subnet": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('existingvnetname'), parameters('existingsubnetname'))]"}}}]}}]}}}} 