Skip to content

not possible to create private endpoint to connect to private link service using its alias with az cli #23687

@ramdaspotale

Description

@ramdaspotale

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}/'.

2022-08-26_16-01-48

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamNetworkaz network vnet/lb/nic/dns/etc...act-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-requestneeds-team-attentionThis issue needs attention from Azure service team or SDK team

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions