3

When we deploy our environment with e.g. AKS and Application Gateway through bicep, we get sometimes this error during AKS provisioning:

{
    "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"
    }
}

We create the Application Gateway in the same bicep file as the AKS, the Application Gateway is referenced here in the bicep code of the AKS:

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

When we run the bicep file again, everything works. So is this a timing issue or do I miss something?

Thanks, Peter

Peter Wyss
  • 395
  • 2
  • 16
  • what do you mean by sometimes ? – Thomas Aug 06 '21 at 12:15
  • Could you share your bicep file as well ? as you said it could be just a timing issue – Thomas Aug 07 '21 at 00:09
  • 1
    I suspect you're running into one of these: https://bmoore-msft.blog/2020/07/26/resource-not-found-dependson-is-not-working/ but may be tricky to translate that into bicep - sharing more of the source code will help... – bmoore-msft Aug 09 '21 at 17:37

0 Answers0