This sample contains a script to easily migrate template gallery templates to templateSpec resources.
{"apiversion": "2020-06-01", "name": "deploy-virus-attack-oms-resource", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('omstemplateuri')]"}, "parameters": {"omsworkspacename": {"value": "[variables('omsworkspacename')]"}, "omssolutionsname": {"value": "[variables('omssolutions')]"}, "sku": {"value": "[parameters('omssku')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2020-06-01", "name": "[concat(parameters('vnetname'),"-","-resource')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('vnettemplateuri')]"}, "parameters": {"vnetname": {"value": "[parameters('vnetname')]"}, "addressprefix": {"value": "[parameters('vnetaddressspace')]"}, "subnets": {"value": "[variables('subnets')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2020-06-01", "name": "[concat(variables('nsgname'),"-","-resource')]", "type": "microsoft.resources/deployments", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('nsgtemplateuri')]"}, "parameters": {"nsgname": {"value": "[variables('nsgname')]"}, "securityrules": {"value": "[variables('nsgsecurityrules')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}}{"apiversion": "2020-06-01", "name": "[concat(variables('vmnames')[copyindex()],"-pip","-resource')]", "type": "microsoft.resources/deployments", "copy": {"name": "copy-pip", "count": 2}, "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('piptemplateuri')]"}, "parameters": {"publicipaddressname": {"value": "[concat(variables('vmnames')[copyindex()],"-pip')]"}, "publicipaddresstype": {"value": "[parameters('pipaddresstype')]"}, "dnsnameforpublicip": {"value": "[concat(variables('vmnames')[copyindex()],uniquestring(resourcegroup().id, "pip'),"-pip')]"}, "location": {"value": "[parameters('location')]"}, "tags": {"value": "[variables('tags')]"}}}} 