feat: Reusing existing AI foundry changes #507
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 parameterAZURE_EXISTING_AI_PROJECT_RESOURCE_IDto allow specifying the resource ID of an existing AI Foundry Project.infra/deploy_ai_foundry.bicep: Introduced conditional logic to check for the presence ofazureExistingAIProjectResourceIdand 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 asexisting_AIProject_SearchConnectionModuleandassignOpenAIRoleToAISearch. 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 fromazureExistingAIProjectResourceId. [1] [2]Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information