This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"topicName": { | |
"type": "string", | |
"metadata": { | |
"description": "The value to use for creating the Event Grid Application Topic." | |
} | |
}, | |
"subscriptionName": { | |
"type": "string", | |
"metadata": { | |
"description": "The value to use for creating the Event SubScription." | |
} | |
}, | |
"subEndpoint": { | |
"type": "string", | |
"metadata": { | |
"description": "The URL you want to push events to." | |
} | |
} | |
}, | |
"variables": { | |
"apiVersion": "2017-06-15-preview" | |
}, | |
"resources": [ | |
{ | |
"name": "[parameters('topicName')]", | |
"type": "Microsoft.EventGrid/topics", | |
"apiVersion": "[variables('apiVersion')]", | |
"location": "[resourceGroup().location]", | |
"tags": {}, | |
"properties": { | |
}, | |
"resources": [ | |
{ | |
"name": "[concat(concat(parameters('topicName'), '/Microsoft.EventGrid/'), parameters('subscriptionName'))]", | |
"type": "Microsoft.EventGrid/topics/providers/eventSubscriptions", | |
"apiVersion": "[variables('apiVersion')]", | |
"properties": { | |
"destination": { | |
"endpointType": "WebHook", | |
"properties": { | |
"endpointUrl": "[parameters('subEndpoint')]" | |
} | |
} | |
}, | |
"dependsOn": [ | |
"[concat('Microsoft.EventGrid/topics/', parameters('topicName'))]" | |
] | |
} | |
] | |
} | |
], | |
"outputs": { | |
"key1": { | |
"value": "[listkeys(resourceId('Microsoft.EventGrid/topics', parameters('topicName')), variables('apiVersion')).key1]", | |
"type": "string" | |
}, | |
"eventGridEndPoint": { | |
"type": "string", | |
"value": "[reference(resourceId('Microsoft.EventGrid/topics', parameters('topicName'))).endpoint]" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment