diff --git a/Directory.Packages.props b/Directory.Packages.props
index 7095ea3299d..034ceff9c35 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -39,7 +39,7 @@
-
+
diff --git a/src/Aspire.Hosting.Azure.AppService/AzureAppServiceWebSiteResource.cs b/src/Aspire.Hosting.Azure.AppService/AzureAppServiceWebSiteResource.cs
index 5e8a7e6a8c1..b9c8d318bd3 100644
--- a/src/Aspire.Hosting.Azure.AppService/AzureAppServiceWebSiteResource.cs
+++ b/src/Aspire.Hosting.Azure.AppService/AzureAppServiceWebSiteResource.cs
@@ -239,18 +239,30 @@ private async Task GetAppServiceWebsiteNameAsync(PipelineStepContext con
var websiteSuffix = await computerEnv.WebSiteSuffix.GetValueAsync(context.CancellationToken).ConfigureAwait(false);
var websiteName = $"{TargetResource.Name.ToLowerInvariant()}-{websiteSuffix}";
- if (!string.IsNullOrWhiteSpace(deploymentSlot))
+ if (string.IsNullOrWhiteSpace(deploymentSlot))
{
- websiteName += $"-{deploymentSlot}";
+ return TruncateToMaxLength(websiteName, 60);
}
- if (websiteName.Length > 60)
+ websiteName = TruncateToMaxLength(websiteName, MaxWebSiteNamePrefixLengthWithSlot);
+ websiteName += $"-{deploymentSlot}";
+
+ return TruncateToMaxLength(websiteName, MaxHostPrefixLengthWithSlot);
+ }
+
+ private static string TruncateToMaxLength(string value, int maxLength)
+ {
+ if (value.Length <= maxLength)
{
- websiteName = websiteName.Substring(0, 60);
+ return value;
}
- return websiteName;
+ return value.Substring(0, maxLength);
}
private const string AzureManagementScope = "https://management.azure.com/.default";
private const string AzureManagementEndpoint = "https://management.azure.com/";
+ // For Azure App Service, the maximum length for a host name is 63 characters. With slot, the host name is 59 characters, with 4 characters reserved for random slot suffix (very edge case).
+ // Source of truth: https://msazure.visualstudio.com/One/_git/AAPT-Antares-Websites?path=%2Fsrc%2FHosting%2FAdministrationService%2FMicrosoft.Web.Hosting.Administration.Api%2FCommonConstants.cs&_a=contents&version=GBdev
+ internal const int MaxHostPrefixLengthWithSlot = 59;
+ internal const int MaxWebSiteNamePrefixLengthWithSlot = 40;
}
diff --git a/src/Aspire.Hosting.Azure.AppService/AzureAppServiceWebsiteContext.cs b/src/Aspire.Hosting.Azure.AppService/AzureAppServiceWebsiteContext.cs
index 9bf5bcca431..5faf96d8c03 100644
--- a/src/Aspire.Hosting.Azure.AppService/AzureAppServiceWebsiteContext.cs
+++ b/src/Aspire.Hosting.Azure.AppService/AzureAppServiceWebsiteContext.cs
@@ -46,8 +46,11 @@ record struct EndpointMapping(string Scheme, BicepValue Host, int Port,
/// A representing the slot hostname, truncated to 60 characters.
public BicepValue GetSlotHostName(BicepValue deploymentSlot)
{
+ var websitePrefix = BicepFunction.Take(
+ BicepFunction.Interpolate($"{BicepFunction.ToLower(resource.Name)}-{AzureAppServiceEnvironmentResource.GetWebSiteSuffixBicep()}"), AzureAppServiceWebSiteResource.MaxWebSiteNamePrefixLengthWithSlot);
+
return BicepFunction.Take(
- BicepFunction.Interpolate($"{BicepFunction.ToLower(resource.Name)}-{AzureAppServiceEnvironmentResource.GetWebSiteSuffixBicep()}-{BicepFunction.ToLower(deploymentSlot)}"), 60);
+ BicepFunction.Interpolate($"{websitePrefix}-{BicepFunction.ToLower(deploymentSlot)}"), AzureAppServiceWebSiteResource.MaxHostPrefixLengthWithSlot);
}
public async Task ProcessAsync(CancellationToken cancellationToken)
@@ -284,6 +287,7 @@ public void BuildWebSite(AzureResourceInfrastructure infra)
/// The Azure Container Registry managed identity parameter.
/// The Azure Container Registry client ID parameter.
/// The container image parameter.
+ /// The slot configuration names resource.
/// Indicates whether this is a deployment slot.
/// The parent website when creating a slot.
/// The deployment slot name.
@@ -295,6 +299,7 @@ private object CreateAndConfigureWebSite(
BicepValue acrMidParameter,
ProvisioningParameter acrClientIdParameter,
ProvisioningParameter containerImage,
+ HashSet slotConfigNames,
bool isSlot = false,
WebSite? parentWebSite = null,
BicepValue? deploymentSlot = null)
@@ -423,6 +428,12 @@ private object CreateAndConfigureWebSite(
{
slot.SiteConfig.AppSettings.Add(new AppServiceNameValuePair { Name = kv.Key, Value = value });
}
+
+ // make app service references as sticky settings for slots
+ if (kv.Value is EndpointReference)
+ {
+ slotConfigNames.Add(kv.Key);
+ }
}
if (Args.Count > 0)
@@ -559,6 +570,9 @@ static FunctionCallExpression Join(BicepExpression args, string delimeter) =>
if (environmentContext.Environment.EnableDashboard)
{
webSiteRa = AddDashboardPermissionAndSettings(webSite, acrClientIdParameter, deploymentSlot);
+
+ // Make OTEL_SERVICE_NAME a deployment slot sticky appsetting if dashboard is enabled
+ slotConfigNames.Add("OTEL_SERVICE_NAME");
}
if (webSite is WebSite webSiteObject)
@@ -602,6 +616,7 @@ private void BuildWebSiteCore(
// Create parent WebSite from existing
WebSite? parentWebSite = null;
+ HashSet stickyConfigNames = new();
if (deploymentSlot is not null)
{
@@ -617,6 +632,7 @@ private void BuildWebSiteCore(
acrMidParameter,
acrClientIdParameter,
containerImage,
+ stickyConfigNames,
isSlot: deploymentSlot is not null,
parentWebSite: parentWebSite,
deploymentSlot: deploymentSlot);
@@ -644,6 +660,8 @@ private void BuildWebSiteCore(
}
}
}
+
+ AddStickySlotSettings(deploymentSlot is null ? (WebSite)webSite : parentWebSite, stickyConfigNames);
}
///
@@ -662,6 +680,7 @@ private void BuildWebSiteAndSlot(
var acrMidParameter = environmentContext.Environment.ContainerRegistryManagedIdentityId.AsProvisioningParameter(infra);
var acrClientIdParameter = environmentContext.Environment.ContainerRegistryClientId.AsProvisioningParameter(infra);
var containerImage = AllocateParameter(new ContainerImageReference(Resource));
+ HashSet stickyConfigNames = new();
// Main site
var webSite = (WebSite)CreateAndConfigureWebSite(
@@ -671,6 +690,7 @@ private void BuildWebSiteAndSlot(
acrMidParameter,
acrClientIdParameter,
containerImage,
+ stickyConfigNames,
isSlot: false);
// Slot
@@ -681,6 +701,7 @@ private void BuildWebSiteAndSlot(
acrMidParameter,
acrClientIdParameter,
containerImage,
+ stickyConfigNames,
isSlot: true,
parentWebSite: (WebSite)webSite,
deploymentSlot: deploymentSlot);
@@ -702,6 +723,8 @@ private void BuildWebSiteAndSlot(
customizeWebSiteSlotAnnotation.Configure(infra, webSiteSlot);
}
}
+
+ AddStickySlotSettings(webSite, stickyConfigNames);
}
private BicepValue GetEndpointValue(EndpointMapping mapping, EndpointProperty property)
@@ -856,6 +879,31 @@ private void UpdateHostNameForSlot(BicepValue slotName)
}
}
+ ///
+ /// Configures sticky slot settings to ensure deployment slot specific app settings remains with each slot during swaps.
+ ///
+ /// The parent WebSite resource.
+ /// The set of deployment slot app settings
+ private void AddStickySlotSettings(WebSite? parentWebSite, HashSet stickyConfigNames)
+ {
+ if (stickyConfigNames.Count == 0)
+ {
+ return;
+ }
+
+ SlotConfigNames slotConfigNames = new("slotConfigNames")
+ {
+ Parent = parentWebSite
+ };
+
+ foreach (var stickyConfig in stickyConfigNames)
+ {
+ slotConfigNames.AppSettingNames.Add(stickyConfig);
+ }
+
+ Infra.Add(slotConfigNames);
+ }
+
enum SecretType
{
None,
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceContainerWithoutTargetPortUsesDefaultPort.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceContainerWithoutTargetPortUsesDefaultPort.verified.bicep
index 3c1d134905e..e7b4bca654c 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceContainerWithoutTargetPortUsesDefaultPort.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceContainerWithoutTargetPortUsesDefaultPort.verified.bicep
@@ -92,3 +92,13 @@ resource container1_website_ra 'Microsoft.Authorization/roleAssignments@2022-04-
}
scope: webapp
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceProjectWithApplicationInsightsSetsAppSettings.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceProjectWithApplicationInsightsSetsAppSettings.verified.bicep
index f47d8135379..356943aa50d 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceProjectWithApplicationInsightsSetsAppSettings.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceProjectWithApplicationInsightsSetsAppSettings.verified.bicep
@@ -130,3 +130,13 @@ resource project1_website_ra 'Microsoft.Authorization/roleAssignments@2022-04-01
}
scope: webapp
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceProjectWithoutTargetPortUsesContainerPort.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceProjectWithoutTargetPortUsesContainerPort.verified.bicep
index 29eb4d0b065..282728cb714 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceProjectWithoutTargetPortUsesContainerPort.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceProjectWithoutTargetPortUsesContainerPort.verified.bicep
@@ -114,3 +114,13 @@ resource project1_website_ra 'Microsoft.Authorization/roleAssignments@2022-04-01
}
scope: webapp
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceToEnvironmentWithoutDashboard.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceToEnvironmentWithoutDashboard.verified.bicep
index 5870c435224..eb29d6c34c4 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceToEnvironmentWithoutDashboard.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceToEnvironmentWithoutDashboard.verified.bicep
@@ -82,3 +82,14 @@ resource webapp 'Microsoft.Web/sites@2025-03-01' = {
}
}
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'PROJECT1_HTTP'
+ 'services__project1__http__0'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithArgs.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithArgs.verified.bicep
index d350d4a1b63..6dbd1e5bea1 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithArgs.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithArgs.verified.bicep
@@ -126,3 +126,15 @@ resource project2_website_ra 'Microsoft.Authorization/roleAssignments@2022-04-01
}
scope: webapp
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'PROJECT1_HTTP'
+ 'services__project1__http__0'
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithDeploymentSlot.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithDeploymentSlot.verified.bicep
index ef8520ce654..0ec32c95796 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithDeploymentSlot.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithDeploymentSlot.verified.bicep
@@ -119,3 +119,13 @@ resource project1_website_slot_ra 'Microsoft.Authorization/roleAssignments@2022-
}
scope: webappslot
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithDeploymentSlotParameter.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithDeploymentSlotParameter.verified.bicep
index 102ca9a606c..36d943cf097 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithDeploymentSlotParameter.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithDeploymentSlotParameter.verified.bicep
@@ -121,3 +121,13 @@ resource project1_website_slot_ra 'Microsoft.Authorization/roleAssignments@2022-
}
scope: webappslot
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithTargetPort.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithTargetPort.verified.bicep
index b8aac197ee6..7497dd16ac5 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithTargetPort.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithTargetPort.verified.bicep
@@ -128,3 +128,17 @@ resource project2_website_ra 'Microsoft.Authorization/roleAssignments@2022-04-01
}
scope: webapp
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'PROJECT1_HTTPS'
+ 'services__project1__https__0'
+ 'PROJECT1_HTTP'
+ 'services__project1__http__0'
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithTargetPortMultipleEndpoints.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithTargetPortMultipleEndpoints.verified.bicep
index 02388c3cb8c..ae3456bff0d 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithTargetPortMultipleEndpoints.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddAppServiceWithTargetPortMultipleEndpoints.verified.bicep
@@ -116,3 +116,13 @@ resource project2_website_ra 'Microsoft.Authorization/roleAssignments@2022-04-01
}
scope: webapp
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddContainerAppEnvironmentAddsDeploymentTargetWithContainerAppToProjectResources.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddContainerAppEnvironmentAddsDeploymentTargetWithContainerAppToProjectResources.verified.bicep
index af2c4f73cb1..fd6c01d20a7 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddContainerAppEnvironmentAddsDeploymentTargetWithContainerAppToProjectResources.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddContainerAppEnvironmentAddsDeploymentTargetWithContainerAppToProjectResources.verified.bicep
@@ -115,3 +115,13 @@ resource api_website_ra 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
}
scope: webapp
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddDockerfileWithAppServiceInfrastructureAddsDeploymentTargetWithAppServiceToContainerResources.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddDockerfileWithAppServiceInfrastructureAddsDeploymentTargetWithAppServiceToContainerResources.verified.bicep
index 041e76b6193..6887d206c69 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddDockerfileWithAppServiceInfrastructureAddsDeploymentTargetWithAppServiceToContainerResources.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AddDockerfileWithAppServiceInfrastructureAddsDeploymentTargetWithAppServiceToContainerResources.verified.bicep
@@ -96,3 +96,13 @@ resource api_website_ra 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
}
scope: webapp
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AzureAppServiceSupportBaitAndSwitchResources.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AzureAppServiceSupportBaitAndSwitchResources.verified.bicep
index 98b87f327f6..cb0723e582e 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AzureAppServiceSupportBaitAndSwitchResources.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.AzureAppServiceSupportBaitAndSwitchResources.verified.bicep
@@ -112,3 +112,13 @@ resource api_website_ra 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
}
scope: webapp
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.EndpointReferencesAreResolvedAcrossProjects.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.EndpointReferencesAreResolvedAcrossProjects.verified.bicep
index 1691a1b6beb..d0b2886fad4 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.EndpointReferencesAreResolvedAcrossProjects.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.EndpointReferencesAreResolvedAcrossProjects.verified.bicep
@@ -122,3 +122,15 @@ resource project2_website_ra 'Microsoft.Authorization/roleAssignments@2022-04-01
}
scope: webapp
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'PROJECT1_HTTP'
+ 'services__project1__http__0'
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.KeyvaultReferenceHandling.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.KeyvaultReferenceHandling.verified.bicep
index 7557a450b10..1fe01583139 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.KeyvaultReferenceHandling.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.KeyvaultReferenceHandling.verified.bicep
@@ -172,3 +172,13 @@ resource api_website_ra 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
}
scope: webapp
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.ResourceWithProbes.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.ResourceWithProbes.verified.bicep
index 6354c2b24b7..b227c61c147 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.ResourceWithProbes.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.ResourceWithProbes.verified.bicep
@@ -115,3 +115,13 @@ resource project1_website_ra 'Microsoft.Authorization/roleAssignments@2022-04-01
}
scope: webapp
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.UnknownManifestExpressionProviderIsHandledWithAllocateParameter.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.UnknownManifestExpressionProviderIsHandledWithAllocateParameter.verified.bicep
index 939ed971271..ee8f75975ab 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.UnknownManifestExpressionProviderIsHandledWithAllocateParameter.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureAppServiceTests.UnknownManifestExpressionProviderIsHandledWithAllocateParameter.verified.bicep
@@ -120,3 +120,13 @@ resource api_website_ra 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
}
scope: webapp
}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
+}
\ No newline at end of file
diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureUserAssignedIdentityTests.WithAzureUserAssignedIdentity_WithRoleAssignments_AzureAppService_Works#00.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureUserAssignedIdentityTests.WithAzureUserAssignedIdentity_WithRoleAssignments_AzureAppService_Works#00.verified.bicep
index 19828e5fb9c..a12d97e2880 100644
--- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureUserAssignedIdentityTests.WithAzureUserAssignedIdentity_WithRoleAssignments_AzureAppService_Works#00.verified.bicep
+++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureUserAssignedIdentityTests.WithAzureUserAssignedIdentity_WithRoleAssignments_AzureAppService_Works#00.verified.bicep
@@ -119,4 +119,14 @@ resource myapp_website_ra 'Microsoft.Authorization/roleAssignments@2022-04-01' =
principalType: 'ServicePrincipal'
}
scope: webapp
+}
+
+resource slotConfigNames 'Microsoft.Web/sites/config@2025-03-01' = {
+ name: 'slotConfigNames'
+ properties: {
+ appSettingNames: [
+ 'OTEL_SERVICE_NAME'
+ ]
+ }
+ parent: webapp
}
\ No newline at end of file