Skip to content

Add infrastructure modules for Foundry project and Azure Container Re… - #30

Merged
JesseLiberty merged 1 commit into
mainfrom
DeployToFoundry
Sep 9, 2026
Merged

Add infrastructure modules for Foundry project and Azure Container Re…#30
JesseLiberty merged 1 commit into
mainfrom
DeployToFoundry

Conversation

@JesseLiberty

Copy link
Copy Markdown
Owner

Add infrastructure modules for Foundry project and Azure Container Registry

  • Introduced main.parameters.json for parameter management in HostedAgents/Researcher.
  • Created acr-pull-role-assignment.bicep to assign AcrPull role to service principals.
  • Developed acr.bicep for provisioning Azure Container Registry with managed identity.
  • Implemented connections.bicep to manage project connections for Foundry.
  • Added network.bicep for configuring virtual network and subnets for network isolation.
  • Created private-endpoint-dns.bicep to manage private endpoints and DNS zones.
  • Developed resources.bicep for managing Foundry account, project, and model deployments.
  • Added subnet.bicep for creating subnets within existing virtual networks.
  • Introduced main.bicep and main.parameters.json for HostedAgents/Reviewer to manage existing Foundry projects.
  • Created foundry-project.bicep to manage deployments and connections for Foundry projects.

…gistry

- Introduced main.parameters.json for parameter management in HostedAgents/Researcher.
- Created acr-pull-role-assignment.bicep to assign AcrPull role to service principals.
- Developed acr.bicep for provisioning Azure Container Registry with managed identity.
- Implemented connections.bicep to manage project connections for Foundry.
- Added network.bicep for configuring virtual network and subnets for network isolation.
- Created private-endpoint-dns.bicep to manage private endpoints and DNS zones.
- Developed resources.bicep for managing Foundry account, project, and model deployments.
- Added subnet.bicep for creating subnets within existing virtual networks.
- Introduced main.bicep and main.parameters.json for HostedAgents/Reviewer to manage existing Foundry projects.
- Created foundry-project.bicep to manage deployments and connections for Foundry projects.
Copilot AI lite review requested due to automatic review settings September 9, 2026 18:38
@JesseLiberty
JesseLiberty merged commit 7fef348 into main Sep 9, 2026
1 check passed

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.

🟡 Changes recommended

The updated azure.yaml files hard-code a specific Foundry endpoint and introduce duplicate agent service definitions, and the network-isolation path includes infra gaps that can break private endpoint and ACR pull scenarios.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR introduces Azure Dev “microsoft.foundry” infrastructure-as-code (Bicep) for the HostedAgents projects, covering provisioning for new Foundry projects (Author/Researcher) and “editable infra” templates for existing projects (Blogger/Reviewer), plus wiring updates in each agent’s azure.yaml.

Changes:

  • Added subscription-scoped entrypoint Bicep templates + RG-scoped modules to provision Foundry accounts/projects, model deployments, project connections, optional ACR, and optional network isolation (Author/Researcher).
  • Added “existing project” (reference-only) infra templates for Blogger/Reviewer, including a foundry-project.bicep module for deployments + connections.
  • Updated HostedAgents azure.yaml files to use infra: provider: microsoft.foundry (and adjusted docs to mention azd ai agent init --infra=bicep).
File summaries
File Description
HostedAgents/Reviewer/infra/modules/foundry-project.bicep Module to manage deployments and project connections for an existing Foundry project (Reviewer).
HostedAgents/Reviewer/infra/main.parameters.json Parameter file for Reviewer “existing project” infra entrypoint.
HostedAgents/Reviewer/infra/main.bicep Subscription-scoped entrypoint referencing an existing Foundry project for Reviewer.
HostedAgents/Reviewer/azure.yaml Switches Reviewer to microsoft.foundry infra provider and updates service definitions.
HostedAgents/Researcher/infra/modules/subnet.bicep Subnet creation module for BYO VNet scenarios (Researcher).
HostedAgents/Researcher/infra/modules/resources.bicep Core RG-scoped Foundry resources module (account/project/deployments/connections/ACR/network).
HostedAgents/Researcher/infra/modules/private-endpoint-dns.bicep Private endpoint + private DNS zones for network-secured Foundry account (Researcher).
HostedAgents/Researcher/infra/modules/network.bicep BYO VNet wiring and subnet orchestration for network isolation (Researcher).
HostedAgents/Researcher/infra/modules/connections.bicep Creates Foundry project connections from azure.yaml service definitions (Researcher).
HostedAgents/Researcher/infra/modules/acr.bicep Provisions ACR + role assignment + Foundry project ACR connection (Researcher).
HostedAgents/Researcher/infra/modules/acr-pull-role-assignment.bicep Helper module to grant AcrPull to a principal on a registry (Researcher).
HostedAgents/Researcher/infra/main.parameters.json Parameter file for Researcher provisioning entrypoint.
HostedAgents/Researcher/infra/main.bicep Subscription-scoped provisioning entrypoint that creates RG and deploys Foundry resources (Researcher).
HostedAgents/Researcher/infra/abbreviations.json Abbreviations used for deterministic resource naming (Researcher).
HostedAgents/Researcher/azure.yaml Switches Researcher to microsoft.foundry infra provider and updates service definitions.
HostedAgents/README.md Updates HostedAgents setup instructions to include --infra=bicep.
HostedAgents/Blogger/infra/modules/foundry-project.bicep Module to manage deployments and project connections for an existing Foundry project (Blogger).
HostedAgents/Blogger/infra/main.parameters.json Parameter file for Blogger “existing project” infra entrypoint.
HostedAgents/Blogger/infra/main.bicep Subscription-scoped entrypoint referencing an existing Foundry project for Blogger.
HostedAgents/Blogger/azure.yaml Switches Blogger to microsoft.foundry infra provider and updates service definitions.
HostedAgents/Author/infra/modules/subnet.bicep Subnet creation module for BYO VNet scenarios (Author).
HostedAgents/Author/infra/modules/resources.bicep Core RG-scoped Foundry resources module (account/project/deployments/connections/ACR/network).
HostedAgents/Author/infra/modules/private-endpoint-dns.bicep Private endpoint + private DNS zones for network-secured Foundry account (Author).
HostedAgents/Author/infra/modules/network.bicep BYO VNet wiring and subnet orchestration for network isolation (Author).
HostedAgents/Author/infra/modules/connections.bicep Creates Foundry project connections from azure.yaml service definitions (Author).
HostedAgents/Author/infra/modules/acr.bicep Provisions ACR + role assignment + Foundry project ACR connection (Author).
HostedAgents/Author/infra/modules/acr-pull-role-assignment.bicep Helper module to grant AcrPull to a principal on a registry (Author).
HostedAgents/Author/infra/main.parameters.json Parameter file for Author provisioning entrypoint.
HostedAgents/Author/infra/main.bicep Subscription-scoped provisioning entrypoint that creates RG and deploys Foundry resources (Author).
HostedAgents/Author/infra/abbreviations.json Abbreviations used for deterministic resource naming (Author).
HostedAgents/Author/azure.yaml Switches Author to microsoft.foundry infra provider and updates service definitions.
docs/deployment.md Updates deployment docs to include --infra=bicep.
Review details
  • Files reviewed: 32/32 changed files
  • Comments generated: 12
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +55 to +62
adminUserEnabled: false
// Disable public access when network isolation is enabled so the registry
// stays inside the VNet boundary. Docker-backed agents in isolated projects
// must pull via the private endpoint; public access would leave a dependency
// outside the isolation perimeter and can break pulls in locked-down egress.
publicNetworkAccess: enableNetworkIsolation ? 'Disabled' : 'Enabled'
zoneRedundancy: 'Disabled'
}
Comment on lines +19 to +24
resource subnet 'Microsoft.Network/virtualNetworks/subnets@2024-05-01' = {
name: '${vnetName}/${subnetName}'
properties: {
addressPrefix: addressPrefix
delegations: delegations
}
Comment on lines +55 to +62
adminUserEnabled: false
// Disable public access when network isolation is enabled so the registry
// stays inside the VNet boundary. Docker-backed agents in isolated projects
// must pull via the private endpoint; public access would leave a dependency
// outside the isolation perimeter and can break pulls in locked-down egress.
publicNetworkAccess: enableNetworkIsolation ? 'Disabled' : 'Enabled'
zoneRedundancy: 'Disabled'
}
Comment on lines +19 to +24
resource subnet 'Microsoft.Network/virtualNetworks/subnets@2024-05-01' = {
name: '${vnetName}/${subnetName}'
properties: {
addressPrefix: addressPrefix
delegations: delegations
}
Comment on lines +7 to +9
ai-project:
host: azure.ai.project
endpoint: https://AgentFrameworkJesseLiberty.services.ai.azure.com/api/projects/AgentFramework
Comment on lines +8 to +15
blogger:
project: .
host: azure.ai.agent
language: csharp
uses:
- ai-project
env:
AZURE_AI_MODEL_DEPLOYMENT_NAME: ${AZURE_AI_MODEL_DEPLOYMENT_NAME}
Comment on lines +7 to +9
ai-project:
host: azure.ai.project
endpoint: https://AgentFrameworkJesseLiberty.services.ai.azure.com/api/projects/AgentFramework
Comment on lines +33 to +38
researcher:
project: .
host: azure.ai.agent
language: csharp
uses:
- ai-project
Comment on lines +7 to +9
ai-project:
host: azure.ai.project
endpoint: https://AgentFrameworkJesseLiberty.services.ai.azure.com/api/projects/AgentFramework
Comment on lines +33 to +38
reviewer:
project: .
host: azure.ai.agent
language: csharp
uses:
- ai-project
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