Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 30 additions & 5 deletions Modules/privateEndpoint.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ param groupIds array = [
'blob'
]

var privateDnsZoneName = '${privateEndpointName}.blob.core.windows.net'
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this line I would really like to keep privateEndpointName as a parameter to give more flexibility


var privateDNSZoneName = 'privatelink.blob.core.windows.net'

resource privateEndpoint 'Microsoft.Network/privateEndpoints@2020-11-01' = {
name: privateEndpointName
Expand All @@ -43,8 +43,33 @@ resource privateEndpoint 'Microsoft.Network/privateEndpoints@2020-11-01' = {
}
}

resource privateDnsZones 'Microsoft.Network/privateDnsZones@2020-06-01' = {
name: privateDnsZoneName
tags: tagValues
resource privateDnsZones 'Microsoft.Network/privateDnsZones@2018-09-01' = {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change the api version back to the most recent one?

name: privateDNSZoneName
location: 'global'
}
properties: {}
}

resource privateDnsZoneLink 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2018-09-01' = {
name: '${privateDnsZones.name}/${privateDnsZones.name}-link'
location: 'global'
properties: {
registrationEnabled: false
virtualNetwork: {
id: vnetId
}
}
}
resource privateDnsZoneGroup 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2020-06-01' = {
name: '${privateEndpoint.name}/dnsgroupname'
properties: {
privateDnsZoneConfigs: [
{
name: 'config1'
properties: {
privateDnsZoneId: privateDnsZones.id
}
}
]
}
}