Skip to content

Conversation

@Ragini-Microsoft
Copy link
Contributor

Purpose

This pull request introduces support for reusing existing AI Foundry and AI Foundry Project resources instead of creating new ones during deployment. It includes changes to parameter definitions, conditional logic in resource creation, and role assignments to enable this functionality.

Enhancements for Existing Resource Reuse:

  • docs/CustomizingAzdParameters.md: Added a new parameter AZURE_EXISTING_AI_PROJECT_RESOURCE_ID to allow specifying the resource ID of an existing AI Foundry Project.
  • infra/deploy_ai_foundry.bicep: Introduced conditional logic to check for the presence of azureExistingAIProjectResourceId and reuse existing AI Foundry and AI Foundry Project resources if specified. This includes new variables for endpoints, names, and resource groups, as well as conditional resource declarations. [1] [2] [3] [4]

Updates to Deployment Scripts:

  • infra/deploy_ai_foundry.bicep: Added conditional modules and role assignments for existing resources, such as existing_AIProject_SearchConnectionModule and assignOpenAIRoleToAISearch. Adjusted output variables to handle both new and existing resources. [1] [2]
  • infra/deploy_aifp_aisearch_connection.bicep: Added a new module to handle the connection setup for an existing AI Foundry Project with Azure Cognitive Search.

Documentation and Parameter Adjustments:

  • docs/DeploymentGuide.md: Updated deployment instructions to include parameters for existing resources, such as <AI-Foundry-Name> and <AI-Foundry-Resource-Group-Name>.
  • infra/deploy_app_service.bicep: Added logic to support existing AI Foundry Project resources by introducing variables for subscription, resource group, and service name derived from azureExistingAIProjectResourceId. [1] [2]

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

  • I have built and tested the code locally and in a deployed app
  • For frontend changes, I have pulled the latest code from main, built the frontend, and committed all static files.
  • This is a change for all users of this app. No code or asset is specific to my use case or my organization.

Other Information

@Avijit-Microsoft Avijit-Microsoft merged commit 2cdea6b into dev Jul 16, 2025
5 checks passed
@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants