forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt EG to arm template (Azure#19262)
* arm template * cloud event domain name * name domain * storage * Revert "storage" This reverts commit 5e75e1b. * Update sdk/eventgrid/azure-eventgrid/samples/publish_samples/publish_cloud_events_to_domain_topic_sample.py
- Loading branch information
Rakshith Bhyravabhotla
authored
Jun 23, 2021
1 parent
fb5f472
commit 185b636
Showing
3 changed files
with
129 additions
and
14 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"baseName": { | ||
"type": "String" | ||
} | ||
}, | ||
"variables": { | ||
"apiVersion": "2020-04-01-preview", | ||
"eventGridTopicName": "[concat(parameters('baseName'), 'topic')]", | ||
"eventGridDomainName": "[concat(parameters('baseName'), 'domain')]", | ||
"cloudeventTopicName": "[concat(parameters('baseName'), 'cloudevent-topic')]", | ||
"customeventTopicName": "[concat(parameters('baseName'), 'customevent-topic')]", | ||
"cloudeventDomainName": "[concat(parameters('baseName'), 'cloudevent-domain')]" | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.EventGrid/topics", | ||
"apiVersion": "[variables('apiVersion')]", | ||
"name": "[variables('eventGridTopicName')]", | ||
"location": "[resourceGroup().location]" | ||
}, | ||
{ | ||
"name": "[variables('eventGridDomainName')]", | ||
"type": "Microsoft.EventGrid/domains", | ||
"apiVersion": "[variables('apiVersion')]", | ||
"location": "[resourceGroup().location]", | ||
"properties": {} | ||
}, | ||
{ | ||
"type": "Microsoft.EventGrid/topics", | ||
"apiVersion": "[variables('apiVersion')]", | ||
"name": "[variables('cloudeventTopicName')]", | ||
"location": "[resourceGroup().location]", | ||
"properties": { | ||
"inputSchema": "CloudEventSchemaV1_0" | ||
} | ||
}, | ||
{ | ||
"name": "[variables('cloudeventDomainName')]", | ||
"type": "Microsoft.EventGrid/domains", | ||
"apiVersion": "[variables('apiVersion')]", | ||
"location": "[resourceGroup().location]", | ||
"properties": { | ||
"inputSchema": "CloudEventSchemaV1_0" | ||
} | ||
}, | ||
{ | ||
"type": "Microsoft.EventGrid/topics", | ||
"apiVersion": "[variables('apiVersion')]", | ||
"name": "[variables('customeventTopicName')]", | ||
"location": "[resourceGroup().location]", | ||
"properties": { | ||
"inputSchema": "CustomEventSchema", | ||
"inputSchemaMapping": { | ||
"inputSchemaMappingType": "Json", | ||
"properties": { | ||
"dataVersion": { | ||
"defaultValue": "default", | ||
"sourceField": "TestVersion" | ||
}, | ||
"eventTime": { | ||
"sourceField": "TestEventTime" | ||
}, | ||
"eventType": { | ||
"defaultValue": "default", | ||
"sourceField": "TestEventType" | ||
}, | ||
"id": { | ||
"sourceField": "TestID" | ||
}, | ||
"subject": { | ||
"defaultValue": "default", | ||
"sourceField": "TestSubject" | ||
}, | ||
"topic": { | ||
"sourceField": "TestTopic" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"outputs": { | ||
"EG_TOPIC_HOSTNAME": { | ||
"type": "string", | ||
"value": "[reference(variables('eventGridTopicName')).endpoint]" | ||
}, | ||
"EG_ACCESS_KEY": { | ||
"type": "string", | ||
"value": "[listKeys(resourceId('Microsoft.EventGrid/topics', variables('eventGridTopicName')), variables('apiVersion')).key1]" | ||
}, | ||
"EG_DOMAIN_TOPIC_HOSTNAME": { | ||
"type": "string", | ||
"value": "[reference(variables('eventGridDomainName')).endpoint]" | ||
}, | ||
"EG_DOMAIN_ACCESS_KEY": { | ||
"type": "string", | ||
"value": "[listKeys(resourceId('Microsoft.EventGrid/domains', variables('eventGridDomainName')), variables('apiVersion')).key1]" | ||
}, | ||
"CLOUD_TOPIC_HOSTNAME": { | ||
"type": "string", | ||
"value": "[reference(variables('cloudeventTopicName')).endpoint]" | ||
}, | ||
"CLOUD_ACCESS_KEY": { | ||
"type": "string", | ||
"value": "[listKeys(resourceId('Microsoft.EventGrid/topics', variables('cloudeventTopicName')), variables('apiVersion')).key1]" | ||
}, | ||
"DOMAIN_TOPIC_HOSTNAME": { | ||
"type": "string", | ||
"value": "[reference(variables('cloudeventDomainName')).endpoint]" | ||
}, | ||
"DOMAIN_ACCESS_KEY": { | ||
"type": "string", | ||
"value": "[listKeys(resourceId('Microsoft.EventGrid/domains', variables('cloudeventDomainName')), variables('apiVersion')).key1]" | ||
}, | ||
"CUSTOM_SCHEMA_TOPIC_HOSTNAME": { | ||
"type": "string", | ||
"value": "[reference(variables('customeventTopicName')).endpoint]" | ||
}, | ||
"CUSTOM_SCHEMA_ACCESS_KEY": { | ||
"type": "string", | ||
"value": "[listKeys(resourceId('Microsoft.EventGrid/topics', variables('customeventTopicName')), variables('apiVersion')).key1]" | ||
} | ||
} | ||
} |
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