bicep icon indicating copy to clipboard operation
bicep copied to clipboard

forwardTo and forwardDeadLetteredMessagesTo in service bus queue on second deploy

Open EysteinWaade opened this issue 3 years ago • 11 comments

Bicep version run bicep --version via the Bicep CLI, az bicep version via the AZ CLI or via VS code by navigating to the extensions tab and searching for Bicep v0.10.61 Describe the bug A clear and concise description of what the bug is vs what you expected to happen <Error><Code>400</Code><Detail>SubCode=40000. Absolute URI must be provided. \\\\\\\\nParameter name: ForwardTo. To Reproduce Steps to reproduce the behavior:

Additional context Add any other context about the problem here. simillar isse in java SDK https://github.com/Azure/azure-sdk-for-java/issues/11469

EysteinWaade avatar Sep 23 '22 11:09 EysteinWaade

Can you share the code you are using to reproduce the issue? It seems like a Service Bus API issue, not a bicep issue. Can you try downgrading to an older version of the bicep extension and see if the error goes away?

alex-frankel avatar Sep 23 '22 15:09 alex-frankel

I have been running this for three months and it suddenly failed today. This is how i set up a queue:

param queueName string
param forwardTo string = ''
@description('Maximim number of active messages in the queue before alerts are generated. Default is 0 (no alerts)')
param alertOnActive int = 0
param environment string
param forwardDeadLetteredMessagesTo string = ''

@description('Name of the existing Service Bus Namespace in resource group')
param serviceBusNamespaceName string

resource serviceBusNamespace 'Microsoft.ServiceBus/namespaces@2021-11-01' existing = {
  name: serviceBusNamespaceName
}

resource serviceBusQueue 'Microsoft.ServiceBus/namespaces/queues@2021-11-01' = {
  name: queueName
  parent: serviceBusNamespace
  properties: union({
    lockDuration: 'PT5M'
    maxSizeInMegabytes: 1024
    requiresDuplicateDetection: false
    requiresSession: false
    defaultMessageTimeToLive: 'PT24H'
    deadLetteringOnMessageExpiration: false
    duplicateDetectionHistoryTimeWindow: 'PT10M'
    maxDeliveryCount: 3
    enablePartitioning: false
    enableExpress: false
  }, forwardTo != '' ? {
    forwardTo: forwardTo
  } : {}, forwardDeadLetteredMessagesTo != '' ? {
    forwardDeadLetteredMessagesTo: forwardDeadLetteredMessagesTo
  } : {})
}

module queueAlerts './queue-alerts.bicep' = if (alertOnActive > 0) {
  name: '${queueName}-alerts'
  params: {
    serviceBusNamespaceName: serviceBusNamespaceName
    queueName: queueName
    alertOnActive: alertOnActive
    environment: environment
  }
}

output queueId string = serviceBusQueue.id

I just realised that the version of bicep did not matter, however this works when setting up a fresh queue, but when redeploying this to an exisiting resource, I get the error shown in my last message.

EysteinWaade avatar Sep 23 '22 15:09 EysteinWaade

I just realised that the version of bicep did not matter, however this works when setting up a fresh queue, but when redeploying this to an exisiting resource, I get the error shown in my last message.

Definitely a resource provider issue. Are you able to open an Azure support ticket and have this routed to the service bus team?

alex-frankel avatar Sep 23 '22 17:09 alex-frankel

@alex-frankel I have opened an Azure support ticket. I'll update this issue when I have more insight. Seems like some other people have similar issues.

EysteinWaade avatar Sep 26 '22 06:09 EysteinWaade

Getting the same issue in all environments with a non-bicep ARM template since the 21st. We also have a support request open.

Aussiemon avatar Sep 26 '22 06:09 Aussiemon

Hello @EysteinWaade , Thanks for reporting this issue to us. The ServiceBus team is currently working on rolling out a fix for this issue and we plan to deploy a fix for this by end of Monday(26th September) PST. We apologize for the inconvenience this caused you.

damodaravadhani avatar Sep 26 '22 13:09 damodaravadhani

Thanks for the help. It looks like the problem has been resolved by the Azure Service Bus team.

EysteinWaade avatar Sep 26 '22 16:09 EysteinWaade

@EysteinWaade Which region are your deployments? I can still reproduce the issue over API.

aristosvo avatar Sep 26 '22 17:09 aristosvo

It might be a while before our fix rolls out to all regions.

damodaravadhani avatar Sep 26 '22 17:09 damodaravadhani

@EysteinWaade Which region are your deployments? I can still reproduce the issue over API.

North Europe

EysteinWaade avatar Sep 26 '22 17:09 EysteinWaade

The fix has been rolled out to all regions. Thank you for your patience.

damodaravadhani avatar Sep 27 '22 06:09 damodaravadhani