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

{"type": "microsoft.resources/deployments", "name": "storageaccount", "apiversion": "2021-01-01", "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/storageaccount.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"storageaccountname": {"value": "[variables('storageaccountname')]"}, "storageaccounttype": {"value": "[variables('storageaccounttype')]"}, "location": {"value": "[parameters('location')]"}}}}{"type": "microsoft.resources/deployments", "name": "datafactory", "apiversion": "2021-01-01", "dependson": ["kibanaesdeployedvm"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/datafactory.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"kibanaesdeployedvmip": {"value": "[reference('kibanaesdeployedvm').outputs.publicipaddress.value]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "_artifactslocation": {"value": "[variables('artloc')]"}, "_artifactslocationsastoken": {"value": "[parameters('_artifactslocationsastoken')]"}, "datafactoryname": {"value": "[parameters('datafactoryname')]"}, "datafactorylocation": {"value": "[parameters('location')]"}, "blobcontainer": {"value": "[variables('blobcontainer')]"}, "serviceprincipalid": {"value": "[parameters('serviceprincipalid')]"}, "serviceprincipalkey": {"value": "[parameters('serviceprincipalkey')]"}}}}{"type": "microsoft.resources/deployments", "name": "datalakeanalytics", "apiversion": "2021-01-01", "dependson": ["storageaccount"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/datalakeanalytics.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"adlanalyticsname": {"value": "[parameters('adlanalyticsname')]"}, "adlstorename": {"value": "[parameters('adlstorename')]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "datalakeanalyticslocation": {"value": "[parameters('datalakeanalyticslocation')]"}}}}{"type": "microsoft.resources/deployments", "name": "eventhubtemplate", "apiversion": "2021-01-01", "dependson": ["datalakeanalytics"], "properties": {"mode": "incremental", "templatelink": {"uri": "[uri(parameters('_artifactslocation'),concat('nested/eventhub.json", parameters('_artifactslocationsastoken')))]", "contentversion": "1.0.0.0"}, "parameters": {"eventhubnamespacename": {"value": "[parameters('eventhubnamespacename')]"}, "location": {"value": "[parameters('location')]"}, "eventhubsku": {"value": "[parameters('eventhubsku')]"}, "skucapacity": {"value": "[parameters('skucapacity')]"}, "isautoinflateenabled": {"value": "[parameters('isautoinflateenabled')]"}, "maximumthroughputunits": {"value": "[variables('maximumthroughputunits')]"}, "datacleaninginputstream": {"value": "[variables('datacleaninginputstream')]"}, "datacleaningoutputstream": {"value": "[variables('datacleaningoutputstream')]"}, "messageretentionindays": {"value": "[parameters('messageretentionindays')]"}, "partitioncount": {"value": "[parameters('partitioncount')]"}, "captureencodingformat": {"value": "[parameters('captureencodingformat')]"}, "capturetime": {"value": "[parameters('capturetime')]"}, "capturesize": {"value": "[parameters('capturesize')]"}, "storageaccountname": {"value": "[variables('storageaccountname')]"}, "capturenameformat": {"value": "[variables('capturenameformat')]"}}}}