Azure / Azure/bicep

ServiceBus Private Namespace Creation Failure

Open
#8,285 2 comments 0 reactions 0 assignees View on GitHub
provider bug
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**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.

```bicep
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:
```json
{
"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'

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the deployment from the issue's Bicep snippet using the Microsoft.ServiceBus/namespaces/privateEndpointConnections@2021-06-01-preview resource. Compare behavior with the parent attribute and the full namespace-qualified name. Done means the private endpoint connection is created and the deployment completes without a NotFound error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.