我有一个 Azure Devops Release 管道,其中包含 ARM 模板部署步骤。 它实际上部署了一个二头肌文件 二头肌有以下输出 -
output deployedItems array = [for (location, i) in locations: {
item: module[i].outputs.app
}]
基本上是早期模块中的对象数组 在数组中,因为前面的模块在 For 循环中被调用,对于传递到二头肌的每个位置一次调用
这部署得很好
在 ARM 模板部署步骤中,我将“部署输出”设置为 bicepOutput
到目前为止一切都很好
现在,在后面的步骤中,我想从此输出访问一个属性,这就是轮子从总线上脱落的地方。
输出看起来与此类似(为简洁起见进行了编辑)-`
"deployedItems": {
"type": "Array",
"value": [
{
"item": {
"apiVersion": "2023-01-01",
"location": "Australia East",
"properties": {
"name": "testapp2".....
}
}
}
]
我正在尝试以下操作来访问上面代码片段中的项目名称
$(bicepOutput.deployedItems[0].item.properties.name)
但这没有任何作用。 我如何从这个输出中获取这个属性的值?