gpt4 book ai didi

azure - Bicep - 数据工厂身份属性

转载 作者:行者123 更新时间:2023-12-03 04:54:48 25 4
gpt4 key购买 nike

我正在运行二头肌 0.4.1318。

我有一个“主”二头肌模块,它调用子模块来配置数据工厂:

var adfName = 'adf-ctaxrebate-${envPlusSuffix}-${formattedInstanceNum}'
module adfDeploy 'CTaxRebate.dataFactory.bicep' = {
name: 'adfDeploy'
params: {
adfName: adfName
}
}

数据工厂模块如下:

param adfName string

resource adf 'Microsoft.DataFactory/factories@2018-06-01' = {
name:adfName
location: resourceGroup().location
}

output dfId string = adf.identity.principalId

我使用 PowerShell cdmlet New-AzResourceGroupDeployment 来运行主二头肌,但出现以下错误:

The template output 'dfId' is not valid: The language expression
| property 'identity' doesn't exist, available properties are 'apiVersion, location, tags, etc...

我认为这是试图告诉我 adf 模块中的以下行是错误的:

output dfId string = adf.identity.principalId

我对此感到困惑,因为我在以前的项目中使用了相同的代码并且工作正常。

此外,身份属性确实出现在智能感知中:

enter image description here

最佳答案

您需要添加

identity: {
type: 'SystemAssigned'
}

在模块中定义你的DataFactory,告诉系统它应该为你生成一个系统分配的ID。

关于azure - Bicep - 数据工厂身份属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71557314/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com