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
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
<PackageVersion Include="Microsoft.Extensions.Azure" Version="1.13.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="8.4.0" />
<!-- Azure Management SDK for .NET dependencies -->
<PackageVersion Include="Azure.Provisioning" Version="1.4.0" />
<PackageVersion Include="Azure.Provisioning" Version="1.5.0" />
<PackageVersion Include="Azure.Provisioning.AppConfiguration" Version="1.1.0" />
<PackageVersion Include="Azure.Provisioning.AppContainers" Version="1.1.0" />
<PackageVersion Include="Azure.Provisioning.AppContainers" Version="1.2.0" />
<PackageVersion Include="Azure.Provisioning.AppService" Version="1.3.1" />
<PackageVersion Include="Azure.Provisioning.ApplicationInsights" Version="1.1.0" />
<PackageVersion Include="Azure.Provisioning.ContainerRegistry" Version="1.1.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public static IResourceBuilder<AzureContainerAppEnvironmentResource> AddAzureCon

if (appEnvResource.EnableDashboard)
{
var dashboard = new ContainerAppEnvironmentDotnetComponentResource("aspireDashboard", "2024-10-02-preview")
var dashboard = new ContainerAppEnvironmentDotnetComponentResource("aspireDashboard", "2025-10-02-preview")
{
Name = "aspire-dashboard",
ComponentType = "AspireDashboard",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,10 @@ private ContainerApp CreateContainerApp()
};
containerApp.Configuration = configuration;

const string latestPreview = "2025-02-02-preview"; // these properties are currently only available in preview

// default autoConfigureDataProtection to true for .NET projects
if (Resource is ProjectResource)
{
const string latestPreview = "2025-10-02-preview"; // this property is currently only available in preview
containerApp.ResourceVersion = latestPreview;

var value = new BicepValue<bool>(true);
Expand All @@ -125,11 +124,7 @@ private ContainerApp CreateContainerApp()
// default kind to functionapp for Azure Functions
if (Resource.HasAnnotationOfType<AzureFunctionsAnnotation>())
{
containerApp.ResourceVersion = latestPreview;

var value = new BicepValue<string>("functionapp");
((IBicepValue)value).Self = new BicepValueReference(containerApp, "Kind", ["kind"]);
containerApp.ProvisionableProperties["Kind"] = value;
containerApp.Kind = ContainerAppKind.Functionapp;
}

return containerApp;
Expand Down
8 changes: 4 additions & 4 deletions tests/Aspire.Hosting.Azure.Tests/AzureContainerAppsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1690,11 +1690,11 @@ public void FailForNewContainerAppVersions()
{
var containerApp = new ContainerApp("app");

// In order to set autoConfigureDataProtection and kind=functionapp, we need to use a preview API ContainerApp version.
// This test fails on new default versions for ContainerApp so we check if autoConfigureDataProtection/kind exists on the new Azure.Provisioning version.
// Also, we need to ensure the new default version isn't newer than the preview version used to set autoConfigureDataProtection/kind because
// In order to set autoConfigureDataProtection, we need to use a preview API ContainerApp version.
// This test fails on new default versions for ContainerApp so we check if autoConfigureDataProtection exists on the new Azure.Provisioning version.
// Also, we need to ensure the new default version isn't newer than the preview version used to set autoConfigureDataProtection because
// callers will get new APIs that may not work with the preview version we are using.
Assert.True(containerApp.ResourceVersion == "2025-01-01", "When we get a new ResourceVersion for ContainerApps, ensure the version used by ContainerAppContext.CreateContainerApp() still works correctly.");
Assert.True(containerApp.ResourceVersion == "2025-07-01", "When we get a new ResourceVersion for ContainerApps, ensure the version used by ContainerAppContext.CreateContainerApp() still works correctly.");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param existing_env_name string

param existing_env_rg string

resource test_container_app_env 'Microsoft.App/managedEnvironments@2025-01-01' existing = {
resource test_container_app_env 'Microsoft.App/managedEnvironments@2025-07-01' existing = {
name: existing_env_name
scope: resourceGroup(existing_env_rg)
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ resource log_env_shared 'Microsoft.OperationalInsights/workspaces@2025-02-01' ex
scope: resourceGroup(log_env_shared_rg)
}

resource app_host 'Microsoft.App/managedEnvironments@2025-01-01' = {
resource app_host 'Microsoft.App/managedEnvironments@2025-07-01' = {
name: take('apphost${uniqueString(resourceGroup().id)}', 24)
location: location
properties: {
Expand All @@ -57,7 +57,7 @@ resource app_host 'Microsoft.App/managedEnvironments@2025-01-01' = {
tags: tags
}

resource aspireDashboard 'Microsoft.App/managedEnvironments/dotNetComponents@2024-10-02-preview' = {
resource aspireDashboard 'Microsoft.App/managedEnvironments/dotNetComponents@2025-10-02-preview' = {
name: 'aspire-dashboard'
properties: {
componentType: 'AspireDashboard'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ resource env_law 'Microsoft.OperationalInsights/workspaces@2025-02-01' = {
tags: tags
}

resource env 'Microsoft.App/managedEnvironments@2025-01-01' = {
resource env 'Microsoft.App/managedEnvironments@2025-07-01' = {
name: take('env${uniqueString(resourceGroup().id)}', 24)
location: location
properties: {
Expand All @@ -64,7 +64,7 @@ resource env 'Microsoft.App/managedEnvironments@2025-01-01' = {
tags: tags
}

resource aspireDashboard 'Microsoft.App/managedEnvironments/dotNetComponents@2024-10-02-preview' = {
resource aspireDashboard 'Microsoft.App/managedEnvironments/dotNetComponents@2025-10-02-preview' = {
name: 'aspire-dashboard'
properties: {
componentType: 'AspireDashboard'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@description('The location for the resource(s) to be deployed.')
@description('The location for the resource(s) to be deployed.')
param location string = resourceGroup().location

param env_outputs_azure_container_apps_environment_default_domain string
Expand All @@ -13,7 +13,7 @@ param api_containerimage string

param api_containerport string

resource api 'Microsoft.App/containerApps@2025-02-02-preview' = {
resource api 'Microsoft.App/containerApps@2025-10-02-preview' = {
name: 'api'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ resource env_law 'Microsoft.OperationalInsights/workspaces@2025-02-01' = {
tags: tags
}

resource env 'Microsoft.App/managedEnvironments@2025-01-01' = {
resource env 'Microsoft.App/managedEnvironments@2025-07-01' = {
name: take('env${uniqueString(resourceGroup().id)}', 24)
location: location
properties: {
Expand All @@ -59,7 +59,7 @@ resource env 'Microsoft.App/managedEnvironments@2025-01-01' = {
tags: tags
}

resource aspireDashboard 'Microsoft.App/managedEnvironments/dotNetComponents@2024-10-02-preview' = {
resource aspireDashboard 'Microsoft.App/managedEnvironments/dotNetComponents@2025-10-02-preview' = {
name: 'aspire-dashboard'
properties: {
componentType: 'AspireDashboard'
Expand Down Expand Up @@ -95,7 +95,7 @@ resource shares_volumes_cache_0 'Microsoft.Storage/storageAccounts/fileServices/
parent: storageVolumeFileService
}

resource managedStorage_volumes_cache_0 'Microsoft.App/managedEnvironments/storages@2025-01-01' = {
resource managedStorage_volumes_cache_0 'Microsoft.App/managedEnvironments/storages@2025-07-01' = {
name: take('managedstoragevolumescache${uniqueString(resourceGroup().id)}', 24)
properties: {
azureFile: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ resource env_law 'Microsoft.OperationalInsights/workspaces@2025-02-01' = {
tags: tags
}

resource env 'Microsoft.App/managedEnvironments@2025-01-01' = {
resource env 'Microsoft.App/managedEnvironments@2025-07-01' = {
name: 'cae-${resourceToken}'
location: location
properties: {
Expand All @@ -61,7 +61,7 @@ resource env 'Microsoft.App/managedEnvironments@2025-01-01' = {
tags: tags
}

resource aspireDashboard 'Microsoft.App/managedEnvironments/dotNetComponents@2024-10-02-preview' = {
resource aspireDashboard 'Microsoft.App/managedEnvironments/dotNetComponents@2025-10-02-preview' = {
name: 'aspire-dashboard'
properties: {
componentType: 'AspireDashboard'
Expand Down Expand Up @@ -97,7 +97,7 @@ resource shares_volumes_cache_0 'Microsoft.Storage/storageAccounts/fileServices/
parent: storageVolumeFileService
}

resource managedStorage_volumes_cache_0 'Microsoft.App/managedEnvironments/storages@2025-01-01' = {
resource managedStorage_volumes_cache_0 'Microsoft.App/managedEnvironments/storages@2025-07-01' = {
name: take('${toLower('cache')}-${toLower('Appdata')}', 32)
properties: {
azureFile: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ resource my_long_env_name_law 'Microsoft.OperationalInsights/workspaces@2025-02-
tags: tags
}

resource my_long_env_name 'Microsoft.App/managedEnvironments@2025-01-01' = {
resource my_long_env_name 'Microsoft.App/managedEnvironments@2025-07-01' = {
name: take('mylongenvname${uniqueString(resourceGroup().id)}', 24)
location: location
properties: {
Expand All @@ -61,7 +61,7 @@ resource my_long_env_name 'Microsoft.App/managedEnvironments@2025-01-01' = {
tags: tags
}

resource aspireDashboard 'Microsoft.App/managedEnvironments/dotNetComponents@2024-10-02-preview' = {
resource aspireDashboard 'Microsoft.App/managedEnvironments/dotNetComponents@2025-10-02-preview' = {
name: 'aspire-dashboard'
properties: {
componentType: 'AspireDashboard'
Expand Down Expand Up @@ -97,7 +97,7 @@ resource shares_volumes_cache_0 'Microsoft.Storage/storageAccounts/fileServices/
parent: storageVolumeFileService
}

resource managedStorage_volumes_cache_0 'Microsoft.App/managedEnvironments/storages@2025-01-01' = {
resource managedStorage_volumes_cache_0 'Microsoft.App/managedEnvironments/storages@2025-07-01' = {
name: take('${toLower('cache')}-${toLower('Appdata')}-${resourceToken}', 32)
properties: {
azureFile: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param env_outputs_azure_container_apps_environment_default_domain string

param env_outputs_azure_container_apps_environment_id string

resource api 'Microsoft.App/containerApps@2025-01-01' = {
resource api 'Microsoft.App/containerApps@2025-07-01' = {
name: 'api'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param env_outputs_azure_container_apps_environment_default_domain string

param env_outputs_azure_container_apps_environment_id string

resource api 'Microsoft.App/containerApps@2025-01-01' = {
resource api 'Microsoft.App/containerApps@2025-07-01' = {
name: 'api'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ param value string

param minReplicas string

resource api 'Microsoft.App/containerApps@2025-01-01' = {
resource api 'Microsoft.App/containerApps@2025-07-01' = {
name: 'api'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ param env_outputs_azure_container_registry_managed_identity_id string

param api_containerimage string

resource api 'Microsoft.App/containerApps@2025-01-01' = {
resource api 'Microsoft.App/containerApps@2025-07-01' = {
name: 'api'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ param api_containerimage string

param env string

resource api 'Microsoft.App/containerApps@2025-01-01' = {
resource api 'Microsoft.App/containerApps@2025-07-01' = {
name: 'api'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ resource existingKv_secret 'Microsoft.KeyVault/vaults/secrets@2024-11-01' existi
parent: existingKv
}

resource api 'Microsoft.App/containerApps@2025-01-01' = {
resource api 'Microsoft.App/containerApps@2025-07-01' = {
name: 'api'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ param env_outputs_azure_container_registry_managed_identity_id string

param api_containerimage string

resource api 'Microsoft.App/containerApps@2025-01-01' = {
resource api 'Microsoft.App/containerApps@2025-07-01' = {
name: 'api'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ param with_bind_mount_containerimage string

param env_outputs_bindmounts_with_bind_mount_0 string

resource with_bind_mount 'Microsoft.App/containerApps@2025-01-01' = {
resource with_bind_mount 'Microsoft.App/containerApps@2025-07-01' = {
name: 'with-bind-mount'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param env_outputs_azure_container_apps_environment_default_domain string

param env_outputs_azure_container_apps_environment_id string

resource api1 'Microsoft.App/containerApps@2025-01-01' = {
resource api1 'Microsoft.App/containerApps@2025-07-01' = {
name: 'api1-my'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param env_outputs_azure_container_apps_environment_default_domain string

param env_outputs_azure_container_apps_environment_id string

resource api 'Microsoft.App/containerApps@2025-01-01' = {
resource api 'Microsoft.App/containerApps@2025-07-01' = {
name: 'api'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param location string = resourceGroup().location

param env_outputs_azure_container_apps_environment_name string

resource env 'Microsoft.App/managedEnvironments@2025-01-01' existing = {
resource env 'Microsoft.App/managedEnvironments@2025-07-01' existing = {
name: env_outputs_azure_container_apps_environment_name
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ param env_outputs_azure_container_registry_managed_identity_id string

param api_containerimage string

resource api 'Microsoft.App/containerApps@2025-01-01' = {
resource api 'Microsoft.App/containerApps@2025-07-01' = {
name: 'api'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ resource my_ace_law 'Microsoft.OperationalInsights/workspaces@2025-02-01' = {
tags: tags
}

resource my_ace 'Microsoft.App/managedEnvironments@2025-01-01' = {
resource my_ace 'Microsoft.App/managedEnvironments@2025-07-01' = {
name: take('myace${uniqueString(resourceGroup().id)}', 24)
location: location
properties: {
Expand All @@ -61,7 +61,7 @@ resource my_ace 'Microsoft.App/managedEnvironments@2025-01-01' = {
tags: tags
}

resource aspireDashboard 'Microsoft.App/managedEnvironments/dotNetComponents@2024-10-02-preview' = {
resource aspireDashboard 'Microsoft.App/managedEnvironments/dotNetComponents@2025-10-02-preview' = {
name: 'aspire-dashboard'
properties: {
componentType: 'AspireDashboard'
Expand Down Expand Up @@ -97,7 +97,7 @@ resource shares_volumes_druid_0 'Microsoft.Storage/storageAccounts/fileServices/
parent: storageVolumeFileService
}

resource managedStorage_volumes_druid_0 'Microsoft.App/managedEnvironments/storages@2025-01-01' = {
resource managedStorage_volumes_druid_0 'Microsoft.App/managedEnvironments/storages@2025-07-01' = {
name: take('${toLower('druid')}-${toLower('druid_shared')}-${resourceToken}', 32)
properties: {
azureFile: {
Expand All @@ -119,7 +119,7 @@ resource shares_volumes_druid_1 'Microsoft.Storage/storageAccounts/fileServices/
parent: storageVolumeFileService
}

resource managedStorage_volumes_druid_1 'Microsoft.App/managedEnvironments/storages@2025-01-01' = {
resource managedStorage_volumes_druid_1 'Microsoft.App/managedEnvironments/storages@2025-07-01' = {
name: take('${toLower('druid')}-${toLower('coordinator_var')}-${resourceToken}', 32)
properties: {
azureFile: {
Expand All @@ -141,7 +141,7 @@ resource shares_bindmounts_druid_0 'Microsoft.Storage/storageAccounts/fileServic
parent: storageVolumeFileService
}

resource managedStorage_bindmounts_druid_0 'Microsoft.App/managedEnvironments/storages@2025-01-01' = {
resource managedStorage_bindmounts_druid_0 'Microsoft.App/managedEnvironments/storages@2025-07-01' = {
name: take('${toLower('druid')}-${toLower('bm0')}-${resourceToken}', 32)
properties: {
azureFile: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ param enable_feature_value string

param connection_prefix_value string

resource api 'Microsoft.App/containerApps@2025-02-02-preview' = {
resource api 'Microsoft.App/containerApps@2025-10-02-preview' = {
name: 'api'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ param api_containerimage string

param enable_feature_value string

resource api 'Microsoft.App/containerApps@2025-02-02-preview' = {
resource api 'Microsoft.App/containerApps@2025-10-02-preview' = {
name: 'api'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ param certificateName string

param customDomain string

resource api 'Microsoft.App/containerApps@2025-01-01' = {
resource api 'Microsoft.App/containerApps@2025-07-01' = {
name: 'api'
location: location
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ param customDomain string

param expectedCertificateName string

resource api 'Microsoft.App/containerApps@2025-01-01' = {
resource api 'Microsoft.App/containerApps@2025-07-01' = {
name: 'api'
location: location
properties: {
Expand Down
Loading
Loading