我有一个具有以下语法的ARM模板,试图将用户分配的身份添加到AZ负载测试资源。
"resources": [
{
"type": "Microsoft.LoadTestService/loadtests",
"apiVersion": "2021-12-01-preview",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"tags": "[parameters('tags')]",
"identity": {
"type": "userAssigned",
"userAssignedIdentities": {
"/subscriptions/<subscriptionId>/resourceGroups/<RGNAME>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<identityName>": {}
}
}
}
]
在部署过程中我得到以下错误。对这个错误有什么建议吗?一旦我通过飞行前部署,我将删除硬编码的resourceid部分。
New-AzResourceGroupDeployment: 1:02:15 PM - Error: Code=ObjectAdditionalProperties; Message=Additional properties not allowed: userAssignedIdentities. Paths in payload: '$.identity.userAssignedIdentities'
根据最新的文档,标识符唯一可接受的值是当前api的SystemAssigned
或None
。
根据本文档,该属性似乎在较旧的API版本2021-09-01-preview
上可用。