Skip to content

feat: Add virtual network location parameter for cognitive services#97

Closed
Vemarthula-Microsoft wants to merge 5 commits intomicrosoft:mainfrom
Vemarthula-Microsoft:main
Closed

feat: Add virtual network location parameter for cognitive services#97
Vemarthula-Microsoft wants to merge 5 commits intomicrosoft:mainfrom
Vemarthula-Microsoft:main

Conversation

@Vemarthula-Microsoft
Copy link

…odules

Purpose

This pull request enhances the Azure Cognitive Services infrastructure modules by improving support for network isolation and private endpoints. The main changes introduce a new virtualNetworkLocation parameter to ensure private endpoints are deployed in the correct region, and update resource references to handle optional outputs more safely.

Network Isolation and Private Endpoint Improvements:

  • Added the virtualNetworkLocation parameter throughout the deployment modules to ensure private endpoints and related resources are created in the same region as the target subnet/VNet. This helps avoid deployment errors and aligns with Azure requirements. [1] [2] [3]
  • Updated all cognitive service module instantiations (aiServices, contentSafety, vision, language, speech, translator, documentIntelligence) to pass the new virtualNetworkLocation parameter. [1] [2] [3] [4] [5] [6] [7]
  • Modified the private endpoint resource creation to use virtualNetworkLocation instead of the general location parameter, ensuring regional consistency for private endpoints.

Optional Output Handling:

  • Updated references to private DNS zone resource IDs and service outputs to use safe navigation (.?resourceId, .?foundryConnection), preventing errors if outputs are missing or not set. [1] [2] [3] [4] [5] [6] [7]

These changes improve reliability and flexibility when deploying cognitive services with network isolation and private endpoints.

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.

What to Check

Verify that the following are valid

  • ...

Other Information

@description('Specifies the location for all the Azure resources. Defaults to the location of the resource group.')
param location string
@description('Location of the virtual network (must match VNet region for private endpoints).')
param virtualNetworkLocation string
Copy link
Collaborator

@Prajwal-Microsoft Prajwal-Microsoft Dec 3, 2025

Choose a reason for hiding this comment

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

no need to add this as a parm here, directly pass location to other modules

Copy link
Collaborator

Choose a reason for hiding this comment

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

This has to be removed and directly use location

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.

2 participants