Azure / bicep-types-az

Bicep type definitions for ARM resources
MIT License
86 stars 27 forks source link

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

Open benrutter opened 7 months ago

benrutter commented 7 months ago

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:

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:

desination: eventHub

but:

destination: {
  endpointType: 'EventHub',
  properties: {
    resourceId: eventHub
  }
}
majastrz commented 6 months ago

@benrutter If you're up for pursuing this more, the best option is to open a support ticket for the hanging issue as it's not the expected behavior. At the same time, we will move this to the types repo, so it can be eventually triaged with the RP team.

benrutter commented 6 months ago

Cheers @majastrz - by open support ticket, do you mean an MS support ticket outside of any github issues? (appologies- I'm not sure how the different levels of Azure SDK stuff breaks up between what's public vs private)

microsoft-github-policy-service[bot] commented 6 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jfggdl. Please see https://aka.ms/biceptypesinfo for troubleshooting help.