Skip to content

Commit b97dce3

Browse files
committed
add event grid resource
1 parent 4b3beeb commit b97dce3

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

infra/main.bicep

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ param cognitiveServicesName string = '${prefix}cognitiveServices'
2121
@description('Specifies the name of the Azure Storage Account resource.')
2222
param storageAccountName string = '${prefix}sa'
2323

24+
@description('Specifies the name of the Azure Event Grid resource.')
25+
param eventGridName string = '${prefix}eg'
26+
2427
module openAi './modules/openAi.bicep' = {
2528
name: 'openAi'
2629
params: {
@@ -60,3 +63,12 @@ module storageAccount './modules/storageAccount.bicep' = {
6063
tags: tags
6164
}
6265
}
66+
67+
module eventGrid './modules/eventGrid.bicep' = {
68+
name: 'eventGrid'
69+
params: {
70+
name: eventGridName
71+
location: location
72+
tags: tags
73+
}
74+
}

infra/modules/eventGrid.bicep

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Parameters
2+
@description('Specifies the name prefix.')
3+
param prefix string = uniqueString(resourceGroup().id)
4+
5+
@description('Specifies the primary location of Azure resources.')
6+
param location string = resourceGroup().location
7+
8+
@description('Specifies the resource tags.')
9+
param tags object = {}
10+
11+
@description('Specifies the name of the Azure resource.')
12+
param name string = '${prefix}-eventgrid-topic'
13+
14+
resource eventGridTopic 'Microsoft.EventGrid/topics@2024-06-01-preview' = {
15+
name: name
16+
location: location
17+
tags: tags
18+
kind: 'Azure'
19+
sku: {
20+
name: 'Basic'
21+
}
22+
properties: {
23+
inputSchema: 'EventGridSchema'
24+
minimumTlsVersionAllowed: '1.0'
25+
}
26+
}

0 commit comments

Comments
 (0)