willvelida / azure-samples

MIT License
12 stars 9 forks source link

Possible incorrect reference in Private Link Services definition? #3

Open carlgleisner opened 2 months ago

carlgleisner commented 2 months ago

Hi, I'm just loving your great content – exactly what I've been looking for 😀

I tried to deploy your sample app with a hello world Azure Container App behind an Application Gateway, copying your Bicep files verbatim.

However, the deployment of the Microsoft.Network/privateLinkServices@2023-11-01 resource fails. After getting the operational information with az deployment operation group list ... I found the following error message.

Reference Id /subscriptions/[…]/resourceGroups/[…]/providers/Microsoft.Network/applicationGateways/gw-yuihbpu3nv7k4/frontendIPConfigurations/my-frontend is referencing resource of a wrong type.

The Id is expected to reference resources of type loadBalancers/frontendIPConfigurations.

Path properties.loadBalancerFrontendIpConfigurations[0]."

Line breaks added for increased readability of course.

I'm deploying to a resource group if that matters.

I searched GitHub for Bicep files containing loadBalancerFrontendIpConfigurations and applicationGateways but the only result was for your repo.

See this search: https://github.com/search?q=language%3Abicep+loadBalancerFrontendIpConfigurations+applicationGateways&type=code

Looking for other references I found references like this.

loadBalancerFrontendIpConfigurations: [
    {
      id: resourceId('Microsoft.Network/loadBalancers/frontendIpConfigurations', loadBalancer.name, loadBalancer.properties.frontendIPConfigurations[0].name)
    }
  ]

If you could shed any light on this I'd be most grateful 🙏🏻

HsnVahedi commented 1 month ago

Having the same problem

carlgleisner commented 1 month ago

So, I actually removed the private link service – and now I have to figure out wether there are any problems with this. It seems to be working fine.