Azure / Azure/bicep-types-az

Event Subscription For storage event cause hanging in "running" status without error message when given incorrect destination object

Open
#2,126 3 comments 0 reactions 0 assignees View on GitHub
Event Grid Service Attention
Dominant language
TypeScript
Stars
108
Forks
44
Avg merge
18h 53m
Merged PRs (30d)
29

Description

**Bicep version**
0.26.54

**Describe the bug**
(Edit: I first raised this without realising that my bicep code was wrong. I've left this issue open as I guess it should raise an error rather than just hang, but from my point of view everything is up and running now 🎉)

Attempting to create an event subscription with the event hub object erroneously given as the "destination" causes hanging at runtime without error (bicep file runs endlessly in "Running" CLI message, but not visible deployment on portal)

**To Reproduce**
Steps to reproduce the behavior:
Create an event grid topic and event hub, followed by this event subscription:

```bicep
resource eventSubscription 'Microsoft.EventGrid/eventSubscriptions@2023-12-15-preview' = {
name: 'event-subscription'
scope: eventGridTopic
properties: {
destination: eventHub
filter: {
subjectBeginsWith: '/blobServices/default/containers/some-container/blobs/sub/folder/'
includedEventTypes: ['Microsoft.Storage.BlobCreated']
}
}
}
```

This is incorrect bicep and the destination particularly shouldn't be:
```bicep
desination: eventHub
```
but:
```bicep
destination: {
endpointType: 'EventHub',
properties: {
resourceId: eventHub
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the deployment with the Microsoft.EventGrid/eventSubscriptions@2023-12-15-preview resource and the incorrect destination shown in the issue. Determine whether the invalid destination can be rejected before deployment rather than leaving the Bicep CLI in a running state; done means a clear error is produced for this input.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.