I am deploying PEs in my Vnet (dedicated Snet) that are linked to Web App resources deployed with Vnet integration. My understanding is that I need to add A records in the Private DNS Zone. This is turning out to be a lot harder than I would have expected.
How do I add my DNS records in this scenario since I can't add the records until I have deployed my PEs (need the IPs)? Any suggestions on best practices? I've gone in multiple different directions and still haven't found a solution that works effectively.
My thinking is to build an output based on something like this so that I can get each PE details, but I can't seem to get it right. Or maybe there is a better way?
param privateEndpoints array
// Deploy Private Endpoints
resource privateEndpoint 'Microsoft.Network/privateEndpoints@2024-05-01' = [for pe in privateEndpoints: {
name: pe.name
location: pe.location
properties: {
subnet: {
id: pe.properties.subnetId
}
privateLinkServiceConnections: [
{
name: 'link-to-${pe.name}' // Logical name for the private link service connection
properties: {
privateLinkServiceId: pe.properties.privateLinkServiceId // Reference the service being linked to
groupIds: pe.properties.groupIds
}
}
]
}
}]