Issue with repeating deployment of Private Link ARM/Bicep template

Stuart Austin-Greenwood 41 Reputation points
2022-07-15T17:35:24.2+00:00

As part of our deployment pipeline, we are deploying an App Service resource, a App Configuration resource and a Cognitive Search resource, attaching private endpoints to each of these.

Within the past 24 hrs, repeating this deployment incrementally over the resource group has stopped working for the App Configuration and Cognitive Search but not for App Service. We're getting the following error for app configuration and similar for search:

Call to Microsoft.AppConfiguration/configurationStores failed. Error message: The specified name is already in use.

If I delete the private endpoint and re-run the deployment, it works the first time but then errors again the second time. If I export the existing private endpoint template and attempt to deploy that, I still get the error. On the App Service however, both of these work fine multiple times - as expected, on the second and subsequent runs, it sees the private endpoint is there and ignores it.

I have managed to recreate this on another subscription in a different location with a brand new App Configuration resource with the default settings. This is the template that seems to cause the issue:

{  
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",  
    "contentVersion": "1.0.0.0",  
    "parameters": {},  
    "variables": {},  
    "resources": [  
        {  
            "type": "Microsoft.Network/privateEndpoints",  
            "apiVersion": "2021-08-01",  
            "name": "my-private-endpoint-01",  
            "location": "UKSouth",  
            "properties": {  
                "privateLinkServiceConnections": [  
                    {  
                        "name": "my-private-endpoint-01-lsc",  
                        "properties": {  
                            "privateLinkServiceId": "/subscriptions/SUBSCRIPTIONID/resourceGroups/RESOURCEGROUP/providers/Microsoft.AppConfiguration/configurationStores/my-appcs",  
                            "groupIds": [  
                                "configurationStores"  
                            ]  
                        }  
                    }  
                ],  
                "manualPrivateLinkServiceConnections": [],  
                "subnet": {  
                    "id": "/subscriptions/SUBSCRIPTIONID/resourceGroups/RESOURCEGROUP/providers/Microsoft.Network/virtualNetworks/my-vnet/subnets/my-vnet-subnet-1"  
                },  
                "customDnsConfigs": []  
            }  
        }  
    ]  
}  

This was working 24 hours ago and seems to be affected by what resource the privateLinkServiceConnection is attached to. If I just change the privateLinkServiceId to point to the app service and change the groupId to 'sites', I can run this script multiple times and it succeeds every time. When attached to app configuration as above, I can run it once to create the endpoint initially and that succeeds, but if I run it again it fails with the name in use error. For the avoidance of doubt, I have tried using totally different names for the endpoint and connection and the template still only works once for the app configuration.

I am using the default 'Incremental' deployment.

Any ideas what is happening and how to resolve?

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
859 questions
Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
215 questions
Azure Private Link
Azure Private Link
An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
492 questions
{count} votes

1 additional answer

Sort by: Most helpful
  1. MayankBargali-MSFT 69,991 Reputation points
    2022-07-21T16:57:15.907+00:00

    @Stuart Austin-Greenwood @Ruud @Rogers, Michael Apology for the inconvenience due to this issue. I have reached out to my team and will keep you posted.

    **Update: **
    This is a feature that was not supported previously, and the product team has fixed it to support it. The ETA for the deployment to gets completed is 1st Aug across all regions. I will keep you posted if there is any changes/updates.

    3 people found this answer helpful.