fix: preserve connection audience and connector name - #9741
Conversation
|
Azure Pipelines: Successfully started running 3 pipeline(s). 18 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
|
Azure Pipelines: Successfully started running 3 pipeline(s). 18 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Preserves connection audience and connector names throughout Foundry synthesis, provisioning, and infrastructure ejection.
Changes:
- Adds optional
audienceandconnectorNamefields across Go models and schemas. - Propagates both fields through Bicep, Terraform, and compiled ARM templates.
- Adds regression coverage for expansion, preservation, omission, and generated templates.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
azure.ai.projects/.../terraform/variables.tf |
Extends Terraform connection inputs. |
azure.ai.projects/.../terraform/connections.tf |
Emits optional authentication fields. |
azure.ai.projects/.../terraform-existing-project/variables.tf |
Extends existing-project inputs. |
azure.ai.projects/.../terraform-existing-project/connections.tf |
Emits fields for existing projects. |
azure.ai.projects/.../modules/resources.bicep |
Extends the shared connection type. |
azure.ai.projects/.../modules/foundry-project.bicep |
Emits fields during project creation. |
azure.ai.projects/.../modules/connections.bicep |
Documents and emits connection fields. |
azure.ai.projects/.../main.bicep |
Extends top-level connection parameters. |
azure.ai.projects/.../main.arm.json |
Updates compiled greenfield ARM output. |
azure.ai.projects/.../existing-project.bicep |
Extends existing-project parameters. |
azure.ai.projects/.../existing-project.arm.json |
Updates compiled existing-project ARM output. |
azure.ai.projects/.../existing-project-eject.bicep.tmpl |
Preserves fields during Bicep ejection. |
azure.ai.projects/.../synthesizer.go |
Parses and expands both fields. |
azure.ai.projects/.../synthesizer_test.go |
Adds synthesis and template regressions. |
azure.ai.connections/schemas/azure.ai.connection.json |
Documents both service properties. |
azure.ai.agents/.../terraform/variables.tf |
Mirrors Terraform connection inputs. |
azure.ai.agents/.../terraform/connections.tf |
Mirrors optional field emission. |
azure.ai.agents/.../terraform-existing-project/variables.tf |
Mirrors existing-project inputs. |
azure.ai.agents/.../terraform-existing-project/connections.tf |
Mirrors existing-project emission. |
azure.ai.agents/.../modules/resources.bicep |
Mirrors the shared connection type. |
azure.ai.agents/.../modules/foundry-project.bicep |
Mirrors project connection emission. |
azure.ai.agents/.../modules/connections.bicep |
Mirrors connection module changes. |
azure.ai.agents/.../main.bicep |
Mirrors top-level parameter changes. |
azure.ai.agents/.../main.arm.json |
Updates compiled greenfield ARM output. |
azure.ai.agents/.../existing-project.bicep |
Mirrors existing-project parameters. |
azure.ai.agents/.../existing-project.arm.json |
Updates compiled existing-project ARM output. |
azure.ai.agents/.../existing-project-eject.bicep.tmpl |
Preserves fields during ejection. |
azure.ai.agents/.../synthesizer.go |
Mirrors parsing and expansion logic. |
azure.ai.agents/.../synthesizer_test.go |
Adds mirrored regression coverage. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 29 out of 29 changed files in this pull request and generated no new comments.
Suppressed comments (1)
cli/azd/extensions/azure.ai.projects/internal/synthesis/templates/modules/connections.bicep:29
- The
authTypevalues use the ARM wire nameAgenticIdentityToken, as the enum immediately above andnormalizeAuthTypeToARMconfirm. Calling itAgenticIdentityhere can lead users to supply an unsupported manifest value; update this description and the synchronized Agents template/schema wording toAgenticIdentityToken.
@description('Optional token audience for UserEntraToken, AgenticIdentity, or ProjectManagedIdentity connections.')
azure.ai.projects PR buildNote This is an unsigned development build. Install it only if you trust this PR. Install the extension: azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9741/azure-ai-projects.zip"
|
azure.ai.connections PR buildNote This is an unsigned development build. Install it only if you trust this PR. Install the extension: azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/9741/azure-ai-connections.zip"
|
Why
azd provisionsynthesizedazure.ai.connectionresources withoutaudienceandconnectorName, so auth and connector settings were dropped. This affected Azure AI Projects and Agents in both greenfield and existing-project deployments. Connector-only OAuth2 connections also require an explicit emptyproperties.credentialsobject, which the provisioning templates did not emit.What changed
audienceandconnectorNamethrough connection synthesis.${VAR}references during provisioning and preserve them during eject.AgenticIdentityas a configuration alias and normalize it to the ARM valueAgenticIdentityToken.E2E validation
azd ai agent init --infra=bicep --no-promptazd ai agent init --infra=terraform --no-promptazd provision --preview --no-promptazd provision --no-promptaz rest --method get .../connections?api-version=2025-04-01-previewAgenticIdentityToken, agentic audience, OAuth connector name, and empty credentialsazd provision --preview --no-promptazd provision --no-promptaz rest --method get .../connections?api-version=2025-04-01-previewazd up --no-promptazd down --force --purge --no-promptaz group exists --name <disposable-resource-group>The live ARM checks confirmed that
AgenticIdentitybecameAgenticIdentityToken, the agenticaudiencewas preserved, and the OAuth2connectorNameand empty credentials object were present. Azure does not returnaudiencefor the OAuth2 connection because that field applies to identity-based authentication. The normal azd configuration fingerprint was unchanged during the run.Fixes #9734