在启用的逻辑应用上部署具有托管标识访问策略的 KeyVault 服务时,它会失败,因为它尚不存在。我确实为逻辑应用程序添加了依赖项。
奇怪的是,这个模板已经工作了数周,现在每次都失败,所以我有点困惑。我从 MS 的快速入门模板复制了这个。但这不是问题,因为如果您查看错误,它会指向正确的目标资源。如果我在失败后单击重新部署,这个模板也可以工作,因为当时托管标识已经存在。我测试了它,无论如何它失败了。
这是我的 ARM 模板
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logicAppName": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "Describes the name of the Logic App resource"
},
"defaultValue": "demo"
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Specifies the Azure location where the key vault should be created."
}
}
},
"variables": {
"keyVaultName": "[concat('eakeyvault', uniquestring(resourceGroup().id))]",
"logicAppName": "[parameters('logicAppName')]"
},
"resources": [
{
"type": "Microsoft.KeyVault/vaults",
"name": "[variables('keyVaultName')]",
"apiVersion": "2018-02-14",
"location": "[parameters('location')]",
"dependsOn": …Run Code Online (Sandbox Code Playgroud) azure azure-resource-manager azure-rm-template azure-managed-identity