To parameterize the resourceId of the Managed Identity in your ARM template, you would first need to add a parameter in the parameters section of your ARM template. Then, you can use this parameter in the resourceId field.
Add a parameter for your Managed Identity resource ID.
"parameters": {
"managedIdentityResourceId": {
"type": "string",
"metadata": {
"description": "Resource ID of the Managed Identity"
}
},
// ... other parameters ...
}
Use the new parameter in the resourceId field
{
"name": "[concat(parameters('factoryName'), '/<factoryname>')]",
"type": "Microsoft.DataFactory/factories/credentials",
"apiVersion": "2018-06-01",
"properties": {
"type": "ManagedIdentity",
"typeProperties": {
"resourceId": "[parameters('managedIdentityResourceId')]"
}
},
"dependsOn": []
}