Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cli/azd/extensions/azure.ai.agents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Bugs Fixed

- [[#8917]](https://github.com/Azure/azure-dev/pull/8917) Fix an `InvalidTemplate` error when deploying a brownfield (`endpoint:`) Foundry project that declares model deployments without creating a container registry. The `projectName` ARM parameter is now always set, so the referenced `Microsoft.CognitiveServices/accounts/projects` resource gets a valid two-segment name.
- [[#8901]](https://github.com/Azure/azure-dev/pull/8901) Remove duplicate service-target provider claims from the `azure.ai.agents` extension manifest for hosts now owned by the split Foundry extensions (`azure.ai.projects`, `azure.ai.connections`, `azure.ai.toolboxes`). Thanks @huimiu for the contribution!

## 1.0.0-beta.1 (2026-06-30)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -810,11 +810,15 @@ func (p *FoundryProvisioningProvider) brownfieldParams(
params := map[string]any{
"accountName": map[string]any{"value": account},
"deployments": map[string]any{"value": p.brownfieldDeployments},
// projectName is always required: the template unconditionally references
// the existing accounts/projects resource, whose ARM name is
// '<accountName>/<projectName>'. Leaving it empty yields a single-segment
// name and an InvalidTemplate error even when no ACR is created.
"projectName": map[string]any{"value": p.brownfieldProjectName()},
}
if createACR {
params["includeAcr"] = map[string]any{"value": true}
params["acrName"] = map[string]any{"value": p.brownfieldACRName(account)}
params["projectName"] = map[string]any{"value": p.brownfieldProjectName()}
params["tags"] = map[string]any{"value": map[string]string{"azd-env-name": p.envName}}
// Only set location when resolved; an empty value would override the
// template default (resourceGroup().location) and fail the deployment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,20 @@ func TestBrownfieldParams(t *testing.T) {

deployments := []synthesis.Deployment{{Name: "gpt-4o-mini"}}

t.Run("without ACR carries only account and deployments", func(t *testing.T) {
t.Run("without ACR carries account, deployments and projectName", func(t *testing.T) {
t.Parallel()
p := &FoundryProvisioningProvider{envName: "dev", brownfieldDeployments: deployments}
p := &FoundryProvisioningProvider{
envName: "dev",
brownfieldDeployments: deployments,
brownfieldEndpoint: "https://acct.services.ai.azure.com/api/projects/my-project",
}
params := p.brownfieldParams(t.Context(), "acct", "rg", false)

assert.Equal(t, map[string]any{"value": "acct"}, params["accountName"])
assert.Equal(t, map[string]any{"value": deployments}, params["deployments"])
// projectName is always required so the existing accounts/projects
// resource gets a valid two-segment ARM name.
assert.Equal(t, map[string]any{"value": "my-project"}, params["projectName"])
assert.NotContains(t, params, "includeAcr")
assert.NotContains(t, params, "acrName")
})
Expand Down
Loading