Skip to content

Instantly share code, notes, and snippets.

@garrytrinder
Last active July 11, 2020 21:55
Show Gist options
  • Save garrytrinder/af39da86976e13e01550104545e1e985 to your computer and use it in GitHub Desktop.
Save garrytrinder/af39da86976e13e01550104545e1e985 to your computer and use it in GitHub Desktop.
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"eventHubName": {
"type": "string",
"metadata": {
"description": "The name of the Azure Event Hub resource"
}
},
"eventHubNamespaceName": {
"type": "string",
"metadata": {
"description": "The name of the Azure Event Hub namespace"
}
},
"eventHubPolicyName": {
"type": "string",
"metadata": {
"description": "The name of the Azure Event Hub policy"
}
},
"keyVaultName": {
"type": "string",
"metadata": {
"description": "The name of the Azure Key Vault"
}
},
"keyVaultSecretName": {
"type": "string",
"metadata": {
"description": "The name of the secret which will hold the Event Hub connection string"
}
}
},
"functions": [],
"variables": {},
"resources": [
{
"apiVersion": "2017-04-01",
"type": "Microsoft.EventHub/namespaces",
"name": "[parameters('eventHubNamespaceName')]",
"location": "[resourceGroup().location]",
"sku": {
"name": "Basic"
}
},
{
"apiVersion": "2017-04-01",
"type": "Microsoft.EventHub/namespaces/eventhubs",
"name": "[concat(parameters('eventHubNamespaceName'), '/', parameters('eventHubName'))]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.EventHub/namespaces', parameters('eventHubNamespaceName'))]"
],
"properties": {
"messageRetentionInDays": 1,
"partitionCount": 2
}
},
{
"name": "string",
"type": "Microsoft.EventHub/namespaces/authorizationRules",
"apiVersion": "2017-04-01",
"dependsOn": [
"[resourceId('Microsoft.EventHub/namespaces/eventhubs', parameters('eventHubName'))]"
],
"properties": {
"rights": [
"Send"
]
}
}
],
"outputs": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment