We have deployed an Azure front door premium instance connecting to an App Service instance over private endpoints using Az powershell, namely New-AzFrontDoorCdnOrigin
then approving with Approve-AzPrivateEndpointConnection
.
This all works fine.
However, how can this link be removed via preferably Az powershell?
It is as simple as unchecking the "Enable private link service" in the portal, but the Az powershell documentation is unclear to me here.
Things I've tried:
Update-AzFrontDoorCdnOrigin
: specifying a SharedPrivateLinkResourceStatus
of Removed or Disconnected does nothing.Update-AzFrontDoorCdnOrigin
: PrivateLinkId
of empty or null is not allowed.Remove-AzPrivateEndpointConnection
. This removes the connection at the app service, but front door is not aware of the change in state and stops routing traffic to the app service until you manually uncheck the "Enable private link service" box on the origin.Current workaround is
I know the question is about Az Powershell
however if you have stumbled upon this don't waste your time :). The only way I was able to resolve the this was with az cli
and the use of az afd origin create
and az afd origin update
.
see https://learn.microsoft.com/en-us/cli/azure/afd/origin?view=azure-cli-latest#az-afd-origin-create
and https://learn.microsoft.com/en-us/cli/azure/afd/origin?view=azure-cli-latest#az-afd-origin-update