Skip to content

Add multiple DNS zones for Foundry private endpoint#16051

Open
eerhardt wants to merge 1 commit intomicrosoft:mainfrom
eerhardt:SupportMultiplePrivateDNS
Open

Add multiple DNS zones for Foundry private endpoint#16051
eerhardt wants to merge 1 commit intomicrosoft:mainfrom
eerhardt:SupportMultiplePrivateDNS

Conversation

@eerhardt
Copy link
Copy Markdown
Member

Description

Foundry has multiple DNS names it can use, we should support the common ones when creating a private endpoint to a Foundry resource.

This involves a minor binary breaking change on IAzurePrivateEndpointTarget, which is public but experimental.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
  • Does the change make any security assumptions or guarantees?
    • No
  • Does the change require an update in our Aspire docs?
    • No

Foundry has multiple DNS names it can use, we should support the common ones when creating a private endpoint to a Foundry resource.

This involves a minor binary breaking change on IAzurePrivateEndpointTarget, which is public but experimental.
Copilot AI review requested due to automatic review settings April 10, 2026 22:27
@eerhardt
Copy link
Copy Markdown
Member Author

FYI - @ericsuh

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16051

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16051"

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Azure private endpoint support to allow targets (notably Foundry) to associate multiple Private DNS zones with a single private endpoint, reflecting that some services use multiple privatelink.* DNS names.

Changes:

  • Introduce IAzurePrivateEndpointTarget.GetPrivateDnsZoneNames() (replacing the singular zone method) and update all implementers.
  • Update private endpoint provisioning to create/configure multiple Private DNS zone configs for a single endpoint.
  • Add unit test + verified bicep snapshot covering a multi-zone target (Foundry).

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/Aspire.Hosting.Azure.Tests/Snapshots/AzurePrivateEndpointExtensionsTests.AddPrivateEndpoint_CreatesMultipleDnsZones_ForMultiZoneTarget.verified.bicep Adds snapshot verifying a PE references multiple private DNS zones.
tests/Aspire.Hosting.Azure.Tests/AzurePrivateEndpointExtensionsTests.cs Updates existing assertions and adds a new multi-zone PE test.
src/Aspire.Hosting.Foundry/FoundryResource.cs Updates Foundry to return multiple private DNS zone names.
src/Aspire.Hosting.Azure/IAzurePrivateEndpointTarget.cs Changes contract to return multiple private DNS zone names.
src/Aspire.Hosting.Azure/CompatibilitySuppressions.xml Adds package validation suppressions for the intentional interface break.
src/Aspire.Hosting.Azure.WebPubSub/AzureWebPubSubResource.cs Updates private DNS zone API implementation.
src/Aspire.Hosting.Azure.Storage/AzureTableStorageResource.cs Updates private DNS zone API implementation.
src/Aspire.Hosting.Azure.Storage/AzureQueueStorageResource.cs Updates private DNS zone API implementation.
src/Aspire.Hosting.Azure.Storage/AzureDataLakeStorageResource.cs Updates private DNS zone API implementation.
src/Aspire.Hosting.Azure.Storage/AzureBlobStorageResource.cs Updates private DNS zone API implementation.
src/Aspire.Hosting.Azure.Sql/AzureSqlServerResource.cs Updates private DNS zone API implementation (including nested type).
src/Aspire.Hosting.Azure.SignalR/AzureSignalRResource.cs Updates private DNS zone API implementation.
src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusResource.cs Updates private DNS zone API implementation.
src/Aspire.Hosting.Azure.Search/AzureSearchResource.cs Updates private DNS zone API implementation.
src/Aspire.Hosting.Azure.Redis/AzureManagedRedisResource.cs Updates private DNS zone API implementation.
src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresFlexibleServerResource.cs Updates private DNS zone API implementation.
src/Aspire.Hosting.Azure.Network/AzurePrivateEndpointResource.cs Replaces single DNS zone reference with a list of zones on the PE resource.
src/Aspire.Hosting.Azure.Network/AzurePrivateEndpointExtensions.cs Updates PE provisioning to create/configure multiple DNS zone configs.
src/Aspire.Hosting.Azure.KeyVault/AzureKeyVaultResource.cs Updates private DNS zone API implementation.
src/Aspire.Hosting.Azure.EventHubs/AzureEventHubsResource.cs Updates private DNS zone API implementation.
src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBResource.cs Updates private DNS zone API implementation.
src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIResource.cs Updates private DNS zone API implementation.
src/Aspire.Hosting.Azure.AppConfiguration/AzureAppConfigurationResource.cs Updates private DNS zone API implementation.

Comment on lines 24 to +30
IEnumerable<string> GetPrivateLinkGroupIds();

/// <summary>
/// Gets the private DNS zone name for this resource type (e.g., "privatelink.blob.core.windows.net" for blob storage).
/// Gets the private DNS zone names for this resource type (e.g., "privatelink.blob.core.windows.net" for blob storage).
/// </summary>
/// <returns>The private DNS zone name for the private endpoint.</returns>
string GetPrivateDnsZoneName();
/// <returns>A collection of private DNS zone names for the private endpoint.</returns>
IEnumerable<string> GetPrivateDnsZoneNames();
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checked-in public API baseline sources under src/*/api/*.cs don't appear to be updated for this interface change. For example, src/Aspire.Hosting.Azure/api/Aspire.Hosting.Azure.cs still declares IAzurePrivateEndpointTarget.GetPrivateDnsZoneName(), which will cause the public API validation to fail (and may leave other package API baselines out of sync as well). Please regenerate/update the api/*.cs baselines for the affected packages to reflect GetPrivateDnsZoneNames() and the removal of GetPrivateDnsZoneName().

Copilot uses AI. Check for mistakes.
@eerhardt
Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #16051...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 11, 2026 02:17 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 11, 2026 02:17 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 11, 2026 02:17 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 11, 2026 02:17 Failure
@github-actions github-actions bot had a problem deploying to deployment-testing April 11, 2026 02:17 Failure
@github-actions github-actions bot had a problem deploying to deployment-testing April 11, 2026 02:17 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing April 11, 2026 02:17 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing April 11, 2026 02:17 Failure
@github-actions
Copy link
Copy Markdown
Contributor

Deployment E2E Tests failed — 23 passed, 7 failed, 0 cancelled

View test results and recordings

View workflow run

Test Result Recording
Deployment.EndToEnd-VnetSqlServerConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureLogAnalyticsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCompactNamingDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-NspStorageKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksStarterWithRedisDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureContainerRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureServiceBusDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureEventHubsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureStorageDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AppServiceReactDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureAppConfigDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AuthenticationTests ✅ Passed
Deployment.EndToEnd-AcaStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaDeploymentErrorOutputTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaExistingRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCustomRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-TypeScriptVnetSqlServerInfraDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-PythonFastApiDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-TypeScriptExpressDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcrPurgeTaskDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AppServicePythonDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcaCompactNamingUpgradeDeploymentTests ❌ Failed ▶️ View Recording
Deployment.EndToEnd-AcaManagedRedisDeploymentTests ❌ Failed ▶️ View Recording

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.

2 participants