-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
108 additions
and
3 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,57 @@ | ||
param eventhub_namespace_name string = 'jmeventgrid' | ||
param eventhub_name string = 'eventgridsink' | ||
param location string = resourceGroup().location | ||
|
||
resource eventhub_namespace 'Microsoft.EventHub/namespaces@2023-01-01-preview' = { | ||
name: eventhub_namespace_name | ||
location: location | ||
sku: { | ||
name: 'Basic' | ||
tier: 'Basic' | ||
capacity: 1 | ||
} | ||
properties: { | ||
minimumTlsVersion: '1.2' | ||
publicNetworkAccess: 'Enabled' | ||
disableLocalAuth: false | ||
privateEndpointConnections: [] | ||
zoneRedundant: true | ||
isAutoInflateEnabled: false | ||
maximumThroughputUnits: 0 | ||
kafkaEnabled: true | ||
} | ||
} | ||
|
||
|
||
|
||
resource eventhubs_eventgridsink 'Microsoft.EventHub/namespaces/eventhubs@2023-01-01-preview' = { | ||
parent: eventhub_namespace | ||
name: eventhub_name | ||
properties: { | ||
retentionDescription: { | ||
cleanupPolicy: 'Delete' | ||
retentionTimeInHours: 1 | ||
} | ||
messageRetentionInDays: 1 | ||
partitionCount: 1 | ||
status: 'Active' | ||
} | ||
} | ||
|
||
// resource namespaces_jmevgrid_name_default 'Microsoft.EventHub/namespaces/networkrulesets@2023-01-01-preview' = { | ||
// parent: namespaces_jmevgrid_name_resource | ||
// name: 'default' | ||
// properties: { | ||
// publicNetworkAccess: 'Enabled' | ||
// defaultAction: 'Allow' | ||
// virtualNetworkRules: [] | ||
// ipRules: [] | ||
// trustedServiceAccessEnabled: false | ||
// } | ||
// } | ||
|
||
// resource namespaces_jmevgrid_name_evengridsink_Default 'Microsoft.EventHub/namespaces/eventhubs/consumergroups@2023-01-01-preview' = { | ||
// parent: namespaces_jmevgrid_name_evengridsink | ||
// name: '$Default' | ||
// properties: {} | ||
// } |
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
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,33 @@ | ||
@description('Specifies the location for resources.') | ||
param location string = resourceGroup().location | ||
@description('The name of the Event Grid namespace.') | ||
param name_base string = 'jmeventgrid' | ||
@description('An array containing the clients that will be allowed to interact with the Event Grid namespace. Each client must have a name, a thumbprint, and a role. The role can be either "service" or "device".') | ||
param clients array = [ | ||
{ | ||
name: 'name of client' | ||
thumbprint: 'base64 encoded thumbprint' | ||
role: 'service or device' | ||
} | ||
] | ||
|
||
module eventgrid 'eventgrid.bicep' = { | ||
name: 'clients' | ||
params: { | ||
location: location | ||
namespaces_name: name_base | ||
clients: clients | ||
} | ||
} | ||
|
||
module eventhub 'eventhubs.bicep' = { | ||
name: 'eventhub' | ||
params: { | ||
location: location | ||
eventhub_namespace_name: name_base | ||
eventhub_name: '${name_base}sink' | ||
} | ||
} | ||
|
||
output namespace_mqtt_hostname string = eventgrid.outputs.namespace_mqtt_hostname | ||
|