Can't create Event Grid namespace event subscription with "push" delivery mode with Bicep
The question is related to: https://video2.skills-academy.com/en-us/azure/templates/microsoft.eventgrid/namespaces/topics/eventsubscriptions?pivots=deployment-language-bicep
I want to create an event subscription that has "push" as delivery mode. I can't figure out how I'm suppose to do this in a Bicep template. I have however successfully deployed a subscription with "queue" as delivery mode. I am deploying this template with Pulumi. I keep getting this error when I try to deploy:
code="DeploymentFailed"
Details=[{"code":"InvalidRequest","message":"Required property 'properties' not found in JSON. Path '[0]', line 1, position 187."}]
resource topic 'Microsoft.EventGrid/namespaces/topics@2023-12-15-preview' existing = {
name: '${namespaceName}/${topicName}'
}
resource namespaceTopicSub 'Microsoft.EventGrid/namespaces/topics/eventSubscriptions@2023-12-15-preview' = {
name: subscriptionName
parent: topic
properties: {
deliveryConfiguration: {
deliveryMode: 'Push'
push: {
deliveryWithResourceIdentity: {
destination: {
endpointType: 'EventHub'
properties: {
deliveryAttributeMappings: [
{
name: 'eventType'
type: 'Dynamic'
}
]
resourceId: eventHubResourceId
}
}
identity: {
type: 'SystemAssigned'
}
}
eventTimeToLive: 'P1D'
maxDeliveryCount: 4
}
}
eventDeliverySchema: 'CloudEventSchemaV1_0'
}
}