Azure数据工厂无法参数化Blob存储链接服务内的密钥保管库secretName



我正在尝试创建某种AzureBlobStorage链接服务,该服务将通过动态提供的secretName从密钥库中检索其accountKey。我正试着按照这个指南去做。因此,我准备了这个json:

{
"name": "AzureBlobStorageLinkedServiceWithDynamicStorageAccountKeysFromKeyVault",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
"type": "AzureBlobStorage",
"typeProperties": {
"connectionString": "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=@{linkedService().storageAccountName}",
"accountKey": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "AzureKeyVaultWithStorageAccountsSecrets",
"type": "LinkedServiceReference"
},
"secretName": {
"type": "Expression",
"value": "@{linkedService().storageAccountName}"
}
}

},
"parameters": {
"storageAccountName": {
"type": "String",
"defaultValue": "fixmeaccountname"
}
},
"annotations": []
}
}

当我试图测试这个时,我得到了错误

Invalid storage connection string provided to 'UnknownLocation'. Check the storage connection string in configuration. Duplicate setting 'AccountName' found.

如果我从connectionString中删除AccountName=@{linkedService().storageAccountName},那么我就有这个错误

Invalid storage connection string provided to 'UnknownLocation'. Check the storage connection string in configuration. Duplicate setting 'AccountKey' found.

有可能拥有这样一个带有参数化密钥库的链接服务吗?

KV上的秘密是连接字符串还是密钥?我认为您将连接字符串存储为机密,请只使用密钥进行尝试,它应该可以工作。

相关内容

最新更新