Skip to content

Commit

Permalink
Update quickstart.bicep
Browse files Browse the repository at this point in the history
  • Loading branch information
veyalla authored Nov 1, 2024
1 parent 88ccc0c commit 789ebe7
Showing 1 changed file with 14 additions and 46 deletions.
60 changes: 14 additions & 46 deletions samples/quickstarts/quickstart.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ param aioExtensionName string
param aioInstanceName string
param resourceSuffix string = substring(uniqueString(subscription().id, resourceGroup().id, clusterName), 0, 10)
param eventHubName string = 'aio-eh-${resourceSuffix}'
param defaultDataflowEndpointName string = 'default'
param defaultDataflowProfileName string = 'default'

/*****************************************************************************/
/* Existing AIO cluster */
Expand All @@ -32,6 +34,15 @@ resource aioInstance 'Microsoft.IoTOperations/instances@2024-09-15-preview' exis
name: aioInstanceName
}

resource defaultDataflowEndpoint 'Microsoft.IoTOperations/instances/dataflowEndpoints@2024-09-15-preview' existing = {
name: defaultDataflowEndpointName
}

resource defaultDataflowProfile 'Microsoft.IoTOperations/instances/dataflowProfiles@2024-09-15-preview' existing = {
name: defaultDataflowProfileName
parent: aioInstance
}

/*****************************************************************************/
/* Asset */
/*****************************************************************************/
Expand Down Expand Up @@ -116,6 +127,7 @@ resource eventHubNamespace 'Microsoft.EventHub/namespaces@2024-01-01' = {
location: resourceGroup().location
properties: {
disableLocalAuth: false
minimumTlsVersion: '1.2'
}
}

Expand Down Expand Up @@ -144,31 +156,6 @@ resource eventHub 'Microsoft.EventHub/namespaces/eventhubs@2024-01-01' = {
/* Dataflow */
/*****************************************************************************/

resource dataflowEndpointMqttSource 'Microsoft.IoTOperations/instances/dataflowEndpoints@2024-09-15-preview' = {
parent: aioInstance
name: 'quickstart-mqtt-endpoint'
extendedLocation: {
name: customLocation.id
type: 'CustomLocation'
}
properties: {
endpointType: 'Mqtt'
mqttSettings: {
host: 'aio-broker:18883'
tls: {
mode: 'Enabled'
trustedCaCertificateConfigMapRef: 'azure-iot-operations-aio-ca-trust-bundle'
}
authentication: {
method: 'ServiceAccountToken'
serviceAccountTokenSettings: {
audience: 'aio-internal'
}
}
}
}
}

resource dataflowEndpointEventHub 'Microsoft.IoTOperations/instances/dataflowEndpoints@2024-09-15-preview' = {
parent: aioInstance
name: 'quickstart-eh-endpoint'
Expand Down Expand Up @@ -200,28 +187,9 @@ resource dataflowEndpointEventHub 'Microsoft.IoTOperations/instances/dataflowEnd
]
}

resource dataflowProfile 'Microsoft.IoTOperations/instances/dataflowProfiles@2024-09-15-preview' = {
parent: aioInstance
name: 'quickstart-profile'
extendedLocation: {
name: customLocation.id
type: 'CustomLocation'
}
properties: {
diagnostics: {
logs: {
level: 'debug'
}
}
instanceCount: 1
}
dependsOn: [
eventHub
]
}

resource dataflowCToF 'Microsoft.IoTOperations/instances/dataflowProfiles/dataflows@2024-09-15-preview' = {
parent: dataflowProfile
parent: defaultDataflowProfile
name: 'quickstart-oven-dataflow'
extendedLocation: {
name: customLocation.id
Expand All @@ -233,7 +201,7 @@ resource dataflowCToF 'Microsoft.IoTOperations/instances/dataflowProfiles/datafl
{
operationType: 'Source'
sourceSettings: {
endpointRef: dataflowEndpointMqttSource.name
endpointRef: defaultDataflowEndpoint.name
assetRef: asset.name
serializationFormat: 'Json'
dataSources: ['azure-iot-operations/data/${assetName}']
Expand Down

0 comments on commit 789ebe7

Please sign in to comment.