Skip to content

fix: update container registry module to reference VNet and DNS zone … - #326

Merged
Avijit-Microsoft merged 1 commit into
mainfrom
BUG_GOLLA
Jul 17, 2026
Merged

fix: update container registry module to reference VNet and DNS zone …#326
Avijit-Microsoft merged 1 commit into
mainfrom
BUG_GOLLA

Conversation

@Akhileswara-Microsoft

Copy link
Copy Markdown
Contributor

…outputs directly

Purpose

This pull request updates how the container registry module references resource IDs for private networking in infra/main.bicep. Instead of manually constructing resource IDs, it now directly uses output values from the relevant modules, which helps avoid issues related to case sensitivity and ensures more reliable deployments.

Networking resource ID references:

  • Changed privateEndpointSubnetResourceId to use the output from the virtualNetwork module instead of constructing the resource ID manually, preventing case-sensitivity issues and accidental dependencies.
  • Changed privateDnsZoneResourceId to use the output from the avmPrivateDnsZones module, ensuring accurate and consistent resource ID references.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

Other Information

This pull request updates how resource IDs are referenced for the container registry's private networking configuration in main.bicep. Instead of manually constructing resource IDs, the code now references the output values from the relevant modules directly. This change helps prevent case-sensitivity issues and ensures more robust and maintainable infrastructure code.

Improvements to resource ID handling:

  • Updated privateEndpointSubnetResourceId to use virtualNetwork.outputs.backendSubnetResourceId instead of constructing the resource ID manually.
  • Updated privateDnsZoneResourceId to use avmPrivateDnsZones[dnsZoneIndex.containerRegistry].outputs.resourceId instead of constructing the resource ID manually.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates infra/main.bicep to pass private networking resource IDs into the container registry module using module outputs (VNet subnet + Private DNS zone) instead of manually constructing those IDs, improving correctness and robustness (notably around case-sensitivity and exact resource ID formatting).

Changes:

  • Updated privateEndpointSubnetResourceId to use virtualNetwork.outputs.backendSubnetResourceId when private networking is enabled.
  • Updated privateDnsZoneResourceId to use avmPrivateDnsZones[dnsZoneIndex.containerRegistry].outputs.resourceId when private networking is enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Avijit-Microsoft
Avijit-Microsoft merged commit 466bee7 into main Jul 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants