Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ACA] Allow setting of Development stack for containers #8005

Open
1 task done
Fabian-Schmidt opened this issue Mar 11, 2025 · 2 comments
Open
1 task done

[ACA] Allow setting of Development stack for containers #8005

Fabian-Schmidt opened this issue Mar 11, 2025 · 2 comments
Labels
area-integrations Issues pertaining to Aspire Integrations packages azure Issues associated specifically with scenarios tied to using Azure
Milestone

Comments

@Fabian-Schmidt
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I want to set Development stack for an Azure Container App.

It is required to set autoConfigureDataProtection to support easier Autoscaling. See Autoscaling considerations.

Describe the solution you'd like

Ability to configure runtime setting for ACA.

Additional context

See Update Runtime to add DotNet support for schema details.

The bicep for Microsoft.App/containerApps@2024-03-01 must include:

resource backend 'Microsoft.App/containerApps@2024-03-01' = {
  name: 'backend'
  location: location
  properties: {
    configuration: {
[...]
      runtime: {
        dotnet:{
          autoConfigureDataProtection: true
        }
      }
@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label Mar 11, 2025
@eerhardt
Copy link
Member

@tg-msft @m-nash - it looks like the https://www.nuget.org/packages/Azure.Provisioning.AppContainers doesn't have support for this property. Should this issue be transfered to https://github.com/azure/azure-sdk-for-net/?

@eerhardt eerhardt added azure Issues associated specifically with scenarios tied to using Azure area-azure-aca and removed area-azure-aca labels Mar 11, 2025
@eerhardt eerhardt added this to the Backlog milestone Mar 11, 2025
@Fabian-Schmidt
Copy link
Author

Fabian-Schmidt commented Mar 14, 2025

Is there no workaround to just add bicep values if the template owner forget to add it or made a mistake?

This seem like a big flaw that I cannot add arbitrary bicep properties.

Here is my hack to set this for reference:

.PublishAsAzureContainerApp((module, app) =>
{
  app.ResourceVersion = "2024-10-02-preview";
  var dotnet_autoConfigureDataProtection = app.Configuration
      .GetType()
      .GetMethod("DefineProperty", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic)
      !.MakeGenericMethod(typeof(bool))
      .Invoke(app.Configuration, ["DotnetAutoConfigureDataProtection", (string[]?)["runtime", "dotnet", "autoConfigureDataProtection"], false, false, false, null, null])
      as BicepValue<bool>;
  
  dotnet_autoConfigureDataProtection!.Assign(true);
})

I am not sure where the benefit in setting the DefineProperty method as protected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-integrations Issues pertaining to Aspire Integrations packages azure Issues associated specifically with scenarios tied to using Azure
Projects
None yet
Development

No branches or pull requests

2 participants