3

当我们通过二头肌部署我们的环境时,例如 AKS 和应用程序网关,我们有时会在 AKS 配置期间收到此错误:

{
    "status": "Failed",
    "error": {
        "code": "ResourceNotFound",
        "message": "The Resource 'Microsoft.Network/applicationGateways/xxx-agw' under resource group 'xxx-rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
    }
}

我们在与 AKS 相同的二头肌文件中创建应用程序网关,此处在 AKS 的二头肌代码中引用了应用程序网关:

    addonProfiles: {
      ingressApplicationGateway: {
        enabled: true
        config: {
          applicationGatewayId: applicationGateway.id
          effectiveApplicationGatewayId: applicationGateway.id
        }
      }

当我们再次运行二头肌文件时,一切正常。那么这是时间问题还是我错过了什么?

谢谢,彼得

4

1 回答 1

0

Peter Wyss您能否分享更多源代码以更好地理解这个问题?

谢谢bmoore-MSFT。发布您的建议作为帮助社区成员的答案。

以下可能是ResourceNotFound错误的解决方案:

  • 检查资源属性
  • 设置依赖项
  • 获取外部资源
  • 从资源中获取托管标识
  • 移除 API 版本
  • 使用 if() 包装器
  • 使用嵌套部署
  • 删除资源后

你可以参考Resource Not Found (dependsOn is not working) , Resolve resource not found errors and open GitHub issue at Resource Not found

于 2021-08-20T04:47:22.667 回答