Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.63k stars 5.08k forks source link

Event Hub Private Endpoint Connection - cannot create #12516

Open aangelisc opened 3 years ago

aangelisc commented 3 years ago

I believe the v2018-01-01-preview API is mistaken in defining this request as a create request. Attempting to create a private endpoint connection via this request fails with the following:

{
    "error": {
        "message": "The requested resource PRIVATE_ENDPOINT_CONNECTION_NAME does not exist. CorrelationId: 4d820ac2-2645-4897-957c-314b5a1501ee",
        "code": "NotFound"
    }
}

This happens when sending a request to the following endpoint with the following body: Endpoint - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}?api-version=2018-01-01-preview Body:

{
  "properties": {
    "privateEndpoint": {
      "id": "resourceId"
    },
    "privateLinkServiceConnectionState": {
      "status": "Approved",
      "description": "testing"
    },
    "provisioningState": "Succeeded"
  }
}
ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jfggdl.

Issue Details
I believe the `v2018-01-01-preview` API is mistaken in defining this request as a create request. Attempting to create a private endpoint connection via this request fails with the following: ``` { "error": { "message": "The requested resource PRIVATE_ENDPOINT_CONNECTION_NAME does not exist. CorrelationId: 4d820ac2-2645-4897-957c-314b5a1501ee", "code": "NotFound" } } ``` This happens when sending a request to the following endpoint with the following body: Endpoint - https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}?api-version=2018-01-01-preview Body: ``` { "properties": { "privateEndpoint": { "id": "resourceId" }, "privateLinkServiceConnectionState": { "status": "Approved", "description": "testing" }, "provisioningState": "Succeeded" } } ```
Author: aangelisc
Assignees: leni-msft
Labels: `Event Hubs`, `Service Attention`, `needs-triage`, `question`
Milestone: -
aangelisc commented 3 years ago

Is there any update on this? Trying to update an endpoint using the REST API also fails with the following:

{ "error": { "code": "NoRegisteredProviderFound", "message": "No registered resource provider found for location 'uksouth' and API version '2018-01-01-preview'' for type 'namespaces/privateEndpointConnections'. The supported api-versions are '2018-01-01-preview'. The supported locations are ''." } }

leni-msft commented 3 years ago

@cesarme @arundsouza @sjkwak would you be able to take a look at the issue?

aangelisc commented 3 years ago

Is there any news on this? It's been awhile since the initial report and this is quite a blocker for us.

chcorpmy commented 2 years ago

This issue is still open, and ongoing. Suggested work around is to simply not create the private link in ARM/Bicep. The underlying cause appears to be the ServiceBus Private Endpoint not respecting the name field, and instead creating the requested resource with a GUID as the name. This prevents the deployment from completing, despite the resource being created as expected.

Failure reproduces in ARM, and Bicep, and all API versions: