我正在尝试通过 YAML 配置文件启动 Azure ContainerApp 服务。问题出在以下块上:
registries:
- passwordSecretRef: null
server: xxx.azurecr.io
identity: "/subscriptions/xxx/resourcegroups/xxx/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mymanagedidentity"
username: null
错误信息如下:
(InvalidParameterValueInContainerTemplate) 以下字段无效或缺失。字段“configuration.Registries.xxx.azurecr.io.Identity”的详细信息无效:“无效值:“/subscriptions/xxx/resourcegroups/xxx/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mymanagementidentity”:托管标识不存在” ;.
此用户分配的托管确实存在,并且对 acr 范围具有 AcrPull 权限。我可以通过运行 az Identity show --name mymanagementidentity --resource-group xxx --query id --output tsv
来确认此外,如果我通过引用此托管身份的 cli 命令创建容器应用程序,它会完美地工作。
az containerapp create --registry-identity /subscriptions/xxx/resourcegroups/xxx/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mymanagedidentity --registry-server xxx.azurecr.io
如果您能提供有关可能出现的问题以及如何解决该问题的任何意见,我将不胜感激!