我正在尝试创建某种AzureBlobStorage
链接服务,该服务将通过动态提供的accountKey
从Key Vault检索secretName
。我正在尝试遵循this guide。
所以为此,我准备了这个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.
如果我从AccountName=@{linkedService().storageAccountName}
中删除了connectionString
,则出现此错误
Invalid storage connection string provided to 'UnknownLocation'. Check the storage connection string in configuration. Duplicate setting 'AccountKey' found.
是否可以通过参数化的密钥库获得这种链接服务?
答案 0 :(得分:0)
KV上的秘密是连接字符串还是仅仅是密钥?我认为您将连接字符串存储为秘密,请尝试仅使用密钥,它应该可以工作。