Add IAzurePrivateEndpointTarget support to AzureOpenAIResource and FoundryResource#15945
Add IAzurePrivateEndpointTarget support to AzureOpenAIResource and FoundryResource#15945
Conversation
…undryResource Agent-Logs-Url: https://github.com/microsoft/aspire/sessions/c060fb13-56b1-4905-9cbc-b78a181f5062 Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com>
| } | ||
|
|
||
| [Fact] | ||
| public void AzureOpenAIResource_ImplementsIAzurePrivateEndpointTarget() |
There was a problem hiding this comment.
@copilot - make better tests here. Instead of just checking it implements the interface, baseline the bicep produced when using these resources as private endpoints.
There was a problem hiding this comment.
Replaced the simple interface-check tests with proper bicep-baseline tests in AzurePrivateEndpointLockdownTests, following the existing pattern used for CosmosDB, SQL, etc. The new tests (AddAzureOpenAI_WithPrivateEndpoint_GeneratesCorrectBicep and AddFoundry_WithPrivateEndpoint_GeneratesCorrectBicep) create private endpoints and verify the generated bicep via Verify snapshots. (6cfbc31)
|
|
||
| IEnumerable<string> IAzurePrivateEndpointTarget.GetPrivateLinkGroupIds() => ["account"]; | ||
|
|
||
| string IAzurePrivateEndpointTarget.GetPrivateDnsZoneName() => "privatelink.openai.azure.com"; |
There was a problem hiding this comment.
@copilot Are these the correct Dns zone names? Will they always work? Does Cognitive Services need more than 1?
There was a problem hiding this comment.
The DNS zone names and group IDs are correct per Azure Private Link DNS zone configuration:
- Azure OpenAI (Kind=
"OpenAI", resource typeMicrosoft.CognitiveServices/accounts): DNS zoneprivatelink.openai.azure.com, group IDaccount. OpenAI has its own dedicated DNS zone separate from other Cognitive Services. - Foundry/AI Services (Kind=
"AIServices", resource typeMicrosoft.CognitiveServices/accounts): DNS zoneprivatelink.cognitiveservices.azure.com, group IDaccount. This is the general Cognitive Services DNS zone used for AI Services accounts.
Both use account as the only group ID — Cognitive Services resources don't have sub-resource group IDs like Storage does (blob, queue, table, etc.). The account group ID covers the entire Cognitive Services account endpoint. You can see the new bicep baselines in the snapshot files confirming this produces correct private endpoint configurations.
…ndpoints Agent-Logs-Url: https://github.com/microsoft/aspire/sessions/85ce9899-08f7-411c-b83d-e162ddb09217 Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Description
AzureOpenAIResourceandFoundryResourcenow implementIAzurePrivateEndpointTarget, enabling private endpoint connectivity."account", DNS zone"privatelink.openai.azure.com""account", DNS zone"privatelink.cognitiveservices.azure.com"BicepOutputReference Idproperty and emit theidbicep output in their infrastructure configurationAzurePrivateEndpointLockdownTestsChecklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: