This sample contains a script to easily migrate template gallery templates to templateSpec resources.

{"name": "shared", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('sharedtemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"networksettings": {"value": "[variables('networksettings')]"}, "location": {"value": "[parameters('location')]"}}}}{"name": "haproxynode", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["[resourceid('microsoft.resources/deployments/", "shared')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('haproxytemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "mysqlpassword": {"value": "[parameters('mysqlpassword')]"}, "namespace": {"value": "[variables('namespace')]"}, "vmbasename": {"value": "haproxy"}, "subnet": {"value": "[variables('networksettings').subnet.dse]"}, "dnsname": {"value": "[parameters('dnsnameprefix')]"}, "staticip": {"value": "[variables('networksettings').statics.haproxyip]"}, "vmsize": {"value": "[parameters('haproxyvmsize')]"}, "ossettings": {"value": "[variables('haproxyossettings')]"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}, "location": {"value": "[parameters('location')]"}}}}{"name": "masternode", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["[resourceid('microsoft.resources/deployments/", "shared')]", "[resourceid('microsoft.resources/deployments/", "haproxynode')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('mastertemplateurl')]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "mysqlpassword": {"value": "[parameters('mysqlpassword')]"}, "namespace": {"value": "[variables('namespace')]"}, "vmbasename": {"value": "master"}, "masternodeip": {"value": "[variables('networksettings').statics.masterip]"}, "subnet": {"value": "[variables('networksettings').subnet.dse]"}, "vmsize": {"value": "[parameters('mysqlvmsize')]"}, "ossettings": {"value": "[variables('masterossettings')]"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}, "location": {"value": "[parameters('location')]"}}}}{"name": "slavenode01", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["[resourceid('microsoft.resources/deployments/", "shared')]", "[resourceid('microsoft.resources/deployments/", "haproxynode')]", "[resourceid('microsoft.resources/deployments/", "masternode')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('slavetemplateurl01')]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "mysqlpassword": {"value": "[parameters('mysqlpassword')]"}, "namespace": {"value": "[variables('namespace')]"}, "vmbasename": {"value": "slave01"}, "slavestaticip": {"value": "[variables('networksettings').statics.slaveip01]"}, "subnet": {"value": "[variables('networksettings').subnet.dse]"}, "vmsize": {"value": "[parameters('mysqlvmsize')]"}, "ossettings": {"value": "[variables('slaveossettings01')]"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}, "location": {"value": "[parameters('location')]"}}}}{"name": "slavenode02", "type": "microsoft.resources/deployments", "apiversion": "2020-10-01", "dependson": ["[resourceid('microsoft.resources/deployments/", "shared')]", "[resourceid('microsoft.resources/deployments/", "haproxynode')]", "[resourceid('microsoft.resources/deployments/", "masternode')]"], "properties": {"mode": "incremental", "templatelink": {"uri": "[variables('slavetemplateurl02')]", "contentversion": "1.0.0.0"}, "parameters": {"adminusername": {"value": "[parameters('adminusername')]"}, "mysqlpassword": {"value": "[parameters('mysqlpassword')]"}, "namespace": {"value": "[variables('namespace')]"}, "vmbasename": {"value": "slave02"}, "slavestaticip": {"value": "[variables('networksettings').statics.slaveip02]"}, "subnet": {"value": "[variables('networksettings').subnet.dse]"}, "vmsize": {"value": "[parameters('mysqlvmsize')]"}, "ossettings": {"value": "[variables('slaveossettings02')]"}, "authenticationtype": {"value": "[parameters('authenticationtype')]"}, "adminpasswordorkey": {"value": "[parameters('adminpasswordorkey')]"}, "location": {"value": "[parameters('location')]"}}}}