fix: Add support for reusing existing Azure AI Foundry projects in deployment#157
Open
Saswato-Microsoft wants to merge 2 commits into
Open
fix: Add support for reusing existing Azure AI Foundry projects in deployment#157Saswato-Microsoft wants to merge 2 commits into
Saswato-Microsoft wants to merge 2 commits into
Conversation
…ployment Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds “Bring Your Own” (BYO) Azure AI Foundry project support so deployments can target an existing Foundry account/project (including cross-subscription), instead of always provisioning new Foundry resources.
Changes:
- Introduces
existingAiProjectResourceIdinput and outputs parsed Foundry account/project/RG/subscription details from that resource ID. - Updates preprovisioning to parse
AZURE_EXISTING_AI_PROJECT_RESOURCE_IDand publish the correctazd envvalues for downstream automation. - Expands deployment docs/parameter guide with BYO AI Foundry usage and output references.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/preprovision-integrated.ps1 | Detects/parses an existing AI Foundry project resource ID and sets azd env values for cross-RG/sub usage. |
| infra/main.bicepparam | Reads AZURE_EXISTING_AI_PROJECT_RESOURCE_ID, passes it to main.bicep, and conditionally disables Foundry/project deployment toggles. |
| infra/main.bicep | Adds existingAiProjectResourceId param, parses segments into outputs, and emits BYO-related outputs. |
| docs/parameter_guide.md | Documents BYO AI Foundry behavior, setup, permissions, and outputs. |
| docs/deploymentguide.md | Adds BYO AI Foundry parameter guidance and example azd env set usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 adds comprehensive support for Bring Your Own (BYO) Azure AI Foundry Project, allowing deployments to target an existing Foundry account and project—including those in different subscriptions—rather than always creating new ones. The changes span documentation, parameterization, Bicep infrastructure, and pre-provisioning scripts to enable this flexibility, ensure correct environment variable propagation, and update downstream automation accordingly.
BYO AI Foundry Project Support
existingAiProjectResourceIdparameter toinfra/main.bicepandinfra/main.bicepparam, allowing users to specify the full ARM resource ID of an existing AI Foundry project. When set, the deployment skips creating new Foundry account/project resources and targets the existing project for all downstream automation. Cross-subscription resource IDs are supported. [1] [2]deployAiFoundry,deployAfProject, anddeployAAfAgentSvcare automatically disabled, preventing unnecessary resource creation. [1] [2]Automation and Scripting Enhancements
scripts/preprovision-integrated.ps1to detect and parseAZURE_EXISTING_AI_PROJECT_RESOURCE_ID, set the appropriate environment variables, and ensure downstream automation targets the correct (possibly cross-subscription) Foundry project. [1] [2] [3]Documentation Updates
docs/deploymentguide.mdand added a new section todocs/parameter_guide.mddetailing how to use the BYO AI Foundry Project feature, including parameter descriptions, setup instructions, and output references. [1] [2] [3]These changes make it much easier to reuse centrally governed or pre-existing AI Foundry projects, especially in complex enterprise environments with multiple subscriptions and resource groups.
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information