I have a user assigned managed identity and it is associated with my data factory.
This works fine in our DEV environment.
When it comes to deployment however, there is no parameter to provide the user assigned managed Identity that is used in our PRD environment.
As ADF creates the ARM templates itself, it seems my only options are:
- publish the ADF templates to adf_publish branch.
- Manually checkout the arm templates and alter the managed identity
- manually trigger deployment.
or
- use the same managed identity in DEV and PRD
Neither option is desirable.
Is there a way to parameterize the user assigned managed identity for a data factory?
Below is the json from the arm template ADF generates. Note the user assigned Managed Identity is hard coded and not parameterized.
"name": "[concat(parameters('factoryName'), '/KV_Access_MI')]",
"type": "Microsoft.DataFactory/factories/credentials",
"apiVersion": "2018-06-01",
"properties": {
"type": "ManagedIdentity",
"typeProperties": {
"resourceId": "/subscriptions/xxxxx-xxxxx-xxxxx-xxxxx-xxxxx/resourcegroups/DEV-RG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/dev-ManagedIdentity"
}
},
"dependsOn": []