Skip to content

Commit

Permalink
Review remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
janboll committed Nov 4, 2024
1 parent 6e500c6 commit 07d1822
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
9 changes: 0 additions & 9 deletions dev-infrastructure/modules/maestro/maestro-infra.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,5 @@ resource maestroConsumersPublishTopicspacePermissionBinding 'Microsoft.EventGrid
}
}

var privateDnsZoneName = 'privatelink.ts.eventgrid.azure.net'

// TODO: find a place for this
resource eventGridPrivateEndpointDnsZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
name: privateDnsZoneName
location: 'global'
properties: {}
}

output keyVaultName string = kv.name
output eventGridNamespaceName string = eventGridNamespace.name
10 changes: 6 additions & 4 deletions dev-infrastructure/modules/private-endpoint.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ param privateEndpointDnsZoneName string

param vnetId string

resource privateEndpointDnsZone 'Microsoft.Network/privateDnsZones@2020-06-01' existing = {
resource eventGridPrivateEndpointDnsZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
name: privateEndpointDnsZoneName
location: 'global'
properties: {}
}

resource eventGridPrivatEndpoint 'Microsoft.Network/privateEndpoints@2023-09-01' = [
Expand All @@ -38,14 +40,14 @@ resource eventGridPrivatEndpoint 'Microsoft.Network/privateEndpoints@2023-09-01'

resource privateEndpointDnsGroup 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2023-09-01' = [
for index in range(0, length(subnetIds)): {
name: '${serviceType}-dns-group'
name: '${serviceType}-${uniqueString(subnetIds[index])}'
parent: eventGridPrivatEndpoint[index]
properties: {
privateDnsZoneConfigs: [
{
name: 'config1'
properties: {
privateDnsZoneId: privateEndpointDnsZone.id
privateDnsZoneId: eventGridPrivateEndpointDnsZone.id
}
}
]
Expand All @@ -55,7 +57,7 @@ resource privateEndpointDnsGroup 'Microsoft.Network/privateEndpoints/privateDnsZ

resource eventGridPrivateDnsZoneVnetLink 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2020-06-01' = {
name: uniqueString('eventgrid-${uniqueString(vnetId)}')
parent: privateEndpointDnsZone
parent: eventGridPrivateEndpointDnsZone
location: 'global'
properties: {
registrationEnabled: false
Expand Down

0 comments on commit 07d1822

Please sign in to comment.