Hi Team,
I am trying to deploy Event Grid using ARM Template. Here, I am fetching or rather got the ARM template from an already created EventGrid( through Export Template). Below is the Template.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"systemTopics_EventGridSubDemo_name": {
"defaultValue": "EventGridSubDemoTest",
"type": "String"
},
"StorageAccounts_jsoninputfile_externalid": {
"defaultValue": "/subscriptions/{subscription-id}/resourceGroups/{resourcegroup}/providers/Microsoft.Storage/StorageAccounts/{storage-account}",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.EventGrid/systemTopics",
"apiVersion": "2022-06-15",
"name": "[parameters('systemTopics_EventGridSubDemo_name')]",
"location": "eastus",
"properties": {
"source": "[parameters('StorageAccounts_jsoninputfile_externalid')]",
"topicType": "Microsoft.Storage.StorageAccounts"
}
},
{
"type": "Microsoft.EventGrid/systemTopics/eventSubscriptions",
"apiVersion": "2022-06-15",
"name": "[concat(parameters('systemTopics_EventGridSubDemo_name'), '/EventGridDemo')]",
"dependsOn": [
"[resourceId('Microsoft.EventGrid/systemTopics', parameters('systemTopics_EventGridSubDemo_name'))]"
],
"properties": {
"destination": {
"properties": {
"resourceId": "[parameters('StorageAccounts_jsoninputfile_externalid')]",
"queueName": "eventgriddemobus",
"queueMessageTimeToLiveInSeconds": 604800
},
"endpointType": "StorageQueue"
},
"filter": {
"includedEventTypes": [
"Microsoft.Storage.BlobCreated",
"Microsoft.Storage.BlobDeleted"
],
"enableAdvancedFilteringOnArrays": true
},
"labels": [],
"eventDeliverySchema": "EventGridSchema",
"retryPolicy": {
"maxDeliveryAttempts": 30,
"eventTimeToLiveInMinutes": 1440
}
}
},
{
"type": "Microsoft.EventGrid/systemTopics/eventSubscriptions",
"apiVersion": "2022-06-15",
"name": "[concat(parameters('systemTopics_EventGridSubDemo_name'), '/EventGridDemoLogicApp')]",
"dependsOn": [
"[resourceId('Microsoft.EventGrid/systemTopics', parameters('systemTopics_EventGridSubDemo_name'))]"
],
"properties": {
"destination": {
"properties": {
"maxEventsPerBatch": 1,
"preferredBatchSizeInKilobytes": 64
},
"endpointType": "WebHook"
},
"filter": {
"includedEventTypes": [
"Microsoft.Storage.BlobCreated",
"Microsoft.Storage.BlobDeleted"
]
},
"eventDeliverySchema": "EventGridSchema",
"retryPolicy": {
"maxDeliveryAttempts": 30,
"eventTimeToLiveInMinutes": 1440
}
}
}
]
}
But when I try to deploy it, below error is thrown
{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"InvalidRequest\",\r\n \"message\": \"Invalid event subscription request: Supplied URL is invalid. It cannot be null or empty and should be a proper HTTPS URL like https://www.example.com.\"\r\n }\r\n}"}]}}
What I see is , the subscription for storage account is getting created, so guessing its an issue in logic App subscription
Thanks in Advance