diff --git a/.azure/infrastructure/main.bicep b/.azure/infrastructure/main.bicep index 06d7b9230..37c93f97a 100644 --- a/.azure/infrastructure/main.bicep +++ b/.azure/infrastructure/main.bicep @@ -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 } } diff --git a/.azure/modules/monitor-workspace/main.bicep b/.azure/modules/monitor-workspace/main.bicep index 095270eeb..bb763a54e 100644 --- a/.azure/modules/monitor-workspace/main.bicep +++ b/.azure/modules/monitor-workspace/main.bicep @@ -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 @@ -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