I'm trying to parameterize the mongo DB connection's linked service in azure data factory. I have referred the document here. Below is the code I'm trying to update in the code of the linked service
{
"name": "MongoDB",
"properties": {
"type": "MongoDbV2",
"parameters": {
"LSHeatStackConnection": {
"type": "String",
"defaultValue": "mongodb://username:password@1.1.1.4:1800/dbname?authMechanism=SCRAM-SHA-1;authSource=admin"
}
},
"annotations": [],
"typeProperties": {
"connectionString": {
"type": "SecureString",
"value": "@{linkedService().LSHeatStackConnection}"
},
"database": "heatstack"
},
"connectVia": {
"referenceName": "DevIR",
"type": "IntegrationRuntimeReference"
}
}
}
But I'm getting the below error while saving the above code.
Failed to publish ****DB(linked service name). Reason: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.
When I try edit the linked service by clicking the pencil icon, and click on test connection it says success. But when I click finish it throws error and it says Failed to save *****DB. Error: Failed to encrypt sub-resource payload