Skip to content
Merged
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
8 changes: 4 additions & 4 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ module containerRegistry './modules/containerRegistry.bicep' = {
networkRuleBypassOptions: 'AzureServices'
// WAF: host the registry private endpoint in the backend subnet and link it
// to the privatelink.azurecr.io DNS zone so image pulls resolve privately.
// Use deterministic resource IDs here so non-private deployments do not
// pick up unconditional dependencies on the conditional network modules.
privateEndpointSubnetResourceId: enablePrivateNetworking ? resourceId(resourceGroup().name, 'Microsoft.Network/virtualNetworks/subnets', 'vnet-${solutionSuffix}', 'backend') : ''
privateDnsZoneResourceId: enablePrivateNetworking ? resourceId(resourceGroup().name, 'Microsoft.Network/privateDnsZones', 'privatelink.azurecr.io') : ''
// Reference the VNet and DNS zone outputs directly to avoid case-sensitivity
// issues with manually constructed resource IDs.
privateEndpointSubnetResourceId: enablePrivateNetworking ? virtualNetwork!.outputs.backendSubnetResourceId : ''
privateDnsZoneResourceId: enablePrivateNetworking ? avmPrivateDnsZones[dnsZoneIndex.containerRegistry]!.outputs.resourceId : ''
// Application managed identity gets AcrPull for identity-based image pulls.
acrPullPrincipalIds: [
appIdentity.outputs.principalId
Expand Down