Skip to content

Commit

Permalink
Update to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSehr committed Jan 4, 2025
1 parent d5458c8 commit 175b3df
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ resource endpoint 'Microsoft.DigitalTwins/digitalTwinsInstances/endpoints@2023-0
...(properties.endpointType == 'EventGrid'
? {
authenticationType: 'KeyBased'
TopicEndpoint: 'dummy' // eventGridTopic.properties.endpoint // Introduces a breaking dependency
// Should use the comment code for simplification, but this introduces a bug where all deployments not using the eventGridTopic resourceId will fail as they cannot resolve the dependency (that they're not using). Asking for the TopicEndpoints is a workaround.
// TopicEndpoint: eventGridTopic.properties.endpoint // Introduces a breaking dependency. E.g., https://dep-dtdmax-evgt-01.eastus-1.eventgrid.azure.net/api/events
TopicEndpoint: properties.topicEndpoint
accessKey1: eventGridTopic.listkeys().key1
accessKey2: eventGridTopic.listkeys().key2
}
Expand Down Expand Up @@ -168,6 +170,9 @@ type eventGridPropertiesType = {

@description('Required. The resource ID of the Event Grid Topic to get access keys from.')
eventGridTopicResourceId: string

@description('Required. The endpoint of the Event Grid Topic to get access keys from.')
eventGridTopicEndpoint: string
}

@export()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,6 @@ resource serviceBusNamespace 'Microsoft.ServiceBus/namespaces@2022-10-01-preview
}
}
}

// resource authorizationRule 'AuthorizationRules@2024-01-01' = {
// name: 'testRule'
// properties: {
// rights: [
// 'Listen'
// 'Send'
// 'Manage'
// ]
// }
// }
}

resource eventGridTopic 'Microsoft.EventGrid/topics@2022-06-15' = {
Expand Down Expand Up @@ -183,5 +172,8 @@ output managedIdentityResourceId string = managedIdentity.id
@description('The resource ID of the created Event Grid Topic.')
output eventGridTopicResourceId string = eventGridTopic.id

@description('The endpoint of the created Event Grid Topic.')
output eventGridTopicEndpoint string = eventGridTopic.properties.endpoint

@description('The resource ID of the created Event Hub Namespace Event Hub.')
output eventHubNamespaceEventHubResourceId string = eventHubNamespace::eventHub.id
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ module testDeployment '../../../main.bicep' = [
properties: {
endpointType: 'EventGrid'
eventGridTopicResourceId: nestedDependencies.outputs.eventGridTopicResourceId
eventGridTopicEndpoint: nestedDependencies.outputs.eventGridTopicEndpoint
}
}
{
Expand Down

0 comments on commit 175b3df

Please sign in to comment.