Skip to content

Commit

Permalink
remove private endpointt
Browse files Browse the repository at this point in the history
  • Loading branch information
arealmaas committed Nov 19, 2024
1 parent 6004343 commit 6d6ead6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 57 deletions.
2 changes: 0 additions & 2 deletions .azure/infrastructure/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ module monitorWorkspace '../modules/monitor-workspace/main.bicep' = {
params: {
namePrefix: namePrefix
location: location
subnetId: vnet.outputs.monitorSubnetId
vnetId: vnet.outputs.virtualNetworkId
tags: tags
}
}
Expand Down
55 changes: 0 additions & 55 deletions .azure/modules/monitor-workspace/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@ param namePrefix string
@description('The location where the resources will be deployed')
param location string

@description('The ID of the subnet for the Private Link')
param subnetId string

@description('Tags to apply to resources')
param tags object

@description('The ID of the virtual network for the private DNS zone')
param vnetId string

resource monitorWorkspace 'Microsoft.Monitor/accounts@2023-04-03' = {
name: '${namePrefix}-monitor'
location: location
Expand All @@ -23,54 +17,5 @@ resource monitorWorkspace 'Microsoft.Monitor/accounts@2023-04-03' = {
tags: tags
}

// private endpoint name max characters is 80
var monitorPrivateEndpointName = '${namePrefix}-monitor-pe'

resource monitorPrivateEndpoint 'Microsoft.Network/privateEndpoints@2024-03-01' = {
name: monitorPrivateEndpointName
location: location
properties: {
privateLinkServiceConnections: [
{
name: monitorPrivateEndpointName
properties: {
privateLinkServiceId: monitorWorkspace.id
groupIds: [
'prometheusMetrics'
]
}
}
]
customNetworkInterfaceName: '${namePrefix}-monitor-pe-nic'
subnet: {
id: subnetId
}
}
tags: tags
}

module privateDnsZone '../privateDnsZone/main.bicep' = {
name: '${namePrefix}-monitor-pdz'
params: {
namePrefix: namePrefix
defaultDomain: 'privatelink.${location}.prometheus.monitor.azure.com'
vnetId: vnetId
tags: tags
}
}

module privateDnsZoneGroup '../privateDnsZoneGroup/main.bicep' = {
name: '${namePrefix}-monitor-privateDnsZoneGroup'
dependsOn: [
privateDnsZone
]
params: {
name: 'default'
dnsZoneGroupName: 'privatelink-${location}-prometheus-monitor-azure-com'
dnsZoneId: privateDnsZone.outputs.id
privateEndpointName: monitorPrivateEndpoint.name
}
}

output monitorWorkspaceId string = monitorWorkspace.id
output monitorWorkspaceName string = monitorWorkspace.name

0 comments on commit 6d6ead6

Please sign in to comment.