Azure / bicep

Bicep is a declarative language for describing and deploying Azure resources
MIT License
3.22k stars 746 forks source link

ServiceBus Private Namespace Creation Failure #8285

Open chcorpmy opened 2 years ago

chcorpmy commented 2 years ago

Bicep version 0.9.1

Describe the bug When creating a service bus private endpoint the following behaviors are observed:

First, the name field is not respected. This means that the deployment will fail, with the resource being unable to find itself, even though the private endpoint is created.

resource ServiceBusEndpointConnection 'Microsoft.ServiceBus/namespaces/privateEndpointConnections@2021-06-01-preview' = {
  parent: ServiceBusEndpoint
  name: bus-endpoint-connection'
  properties: {
    privateEndpoint: {
      id: ServiceBusEndpoint.id
    }
  }
}

Results in the following failure:

{
    "status": "Failed",
    "error": {
        "code": "NotFound",
        "message": "The requested resource bus-endpoint-connection does not exist. CorrelationId: <...>"
    }
}

To Reproduce Simply add a private endpoint connection to a service bus resource.

Additional context The failure above reproduces with both the parent attribute (as shown) and with the full name i.e. name: '${serviceBus.name}\bus-connection'

chcorpmy commented 2 years ago

Possibly related issue: https://github.com/Azure/azure-rest-api-specs/issues/12516

alex-frankel commented 2 years ago

FWIW, this is being investigate on an internal support case (ICM). @chcorpmy -- can you update this thread with the latest info?