not possible to create private endpoint to connect to private link service using its alias with az cli
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
I was working on possible automation of creating private endpoints, especially connecting to private link service by using private link service alias. however, I did not find any option to do this using azure cli.
usually lots of things that azure portal can not do, they can be done using az cli; however, it seems to be inaccurate in this case. you can create private endpoints with private link service alias using portal but not with az cli.
this is very much needed in automating things in cross-subscription scenarios.
error:
az network private-endpoint create -g platdev2-cust-eastus -n testpep --subnet /subscriptions//resourceGroups/platdev2-cust-eastus/providers/Microsoft.Network/virtualNetworks/platdev2-cust-eastus-vnet/subnets/platdev2-cust-eastus-sub-endpoint-02 --private-connection-resource-id "elastic-obsv-mgmt-eastus-privlink-01.********fba.eastus.azure.privatelinkservice" --connection-name test
(LinkedInvalidPropertyId) Property id 'elastic-obsv-mgmt-eastus-privlink-01.******-*****fba.eastus.azure.privatelinkservice' at path 'properties.privateLinkServiceConnections[0].properties.privateLinkServiceId' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
Code: LinkedInvalidPropertyId
Message: Property id 'elastic-obsv-mgmt-eastus-privlink-01.********-*****fba.eastus.azure.privatelinkservice' at path 'properties.privateLinkServiceConnections[0].properties.privateLinkServiceId' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.

---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 8911e94f-9496-a68d-50c0-b5d536a375a4
* Version Independent ID: cc37b77b-0fa2-991b-e16b-fcdbbf183853
* Content: [az network private-endpoint](https://docs.microsoft.com/en-us/cli/azure/network/private-endpoint?view=azure-cli-latest)
* Content Source: [latest/docs-ref-autogen/network/private-endpoint.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/latest/docs-ref-autogen/network/private-endpoint.yml)
* Service: **virtual-network**
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**
Contributor guide
Assessment
This issue has not been assessed yet.