以下 yaml 脚本因 ARM 部署任务而失败。
该错误非常奇怪,因为我没有使用托管身份更新系统,但这是错误。
脚本如下:
- task: AzureResourceManagerTemplateDeployment@3
inputs:
deploymentScope: 'Resource Group'
azureResourceManagerConnection: 'NewAzureConnection'
subscriptionId: '8bxxxx28c1-4xxxc-axx-9xxxxx03'
action: 'Create Or Update Resource Group'
resourceGroupName: '$(ResourceGroupUAT)'
location: '$(Location)'
templateLocation: 'Linked artifact'
csmFile: '$(System.DefaultWorkingDirectory)/adf-xxx-fabric-dev/ARMTemplateForFactory.json'
csmParametersFile: '$(System.DefaultWorkingDirectory)/adf-xxxx-fabric-dev/ARMTemplateParametersForFactory.json'
overrideParameters: '-factoryName $(DataFactoryUAT)'
deploymentMode: 'Incremental'
对错误有什么想法吗?
正如 Vinicius 提到的,我认为问题出在 JSON 文件上。我将提供完整 JSON 文件的链接,同时 JSON 中引用 ManagedIdentity 的代码如下所示:
{
"name": "[concat(parameters('factoryName'), '/WorkspaceSystemIdentity')]",
"type": "Microsoft.DataFactory/factories/credentials",
"apiVersion": "2018-06-01",
"properties": {
"type": "ManagedIdentity",
"typeProperties": {}
},
"dependsOn": []
我应该更改托管身份吗?
我通过注释掉引用托管身份的 ARMTemplateForFactory.json 解决了该问题:
// {
// "name": "[concat(parameters('factoryName'), '/WorkspaceSystemIdentity')]",
// "type": "Microsoft.DataFactory/factories/credentials",
// "apiVersion": "2018-06-01",
// "properties": {
// "type": "ManagedIdentity",
// "typeProperties": {}
// },
// "dependsOn": []
// },