aspire icon indicating copy to clipboard operation
aspire copied to clipboard

Provide ability to configure the ACA resource properties through C# code

Open Kumima opened this issue 2 years ago • 4 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

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

Currently, we can configure the Azure resources properties through Aspire.Hosting.Azure.{*ResourceType}. They are generated as *.module.bicep.

What about the built-in resources for azd deployment, including ContainerAppEnvironment, ContainerRegistry, LogAnalyticsWorkspace and so on? They are basically defined in resources.bicep.

In addition, what about the configuration for each container app service, such as the scale rule and custom domain? They are defined in *.tmpl.yaml.

Describe the solution you'd like

Provide ability to configure auto-generated resources and container app properties through C# code.

Additional context

No response

Kumima avatar Aug 05 '24 14:08 Kumima

I was able to configure that manually after editing files generated by infra synth, but as you've mentioned on discord channel, it's far from optimal since it's getting overwritten on every infra synth generation.

It would be nice to have an option to configure those services for dev/prod scenarios where control over provisioned resources is necessary.

MateuszPeczek avatar Aug 05 '24 15:08 MateuszPeczek

You can read the details here https://github.com/Azure/azure-dev/issues/3292

davidfowl avatar Aug 05 '24 22:08 davidfowl

@davidfowl I took a quick look at your pull request, it only focuses on the container app. What about the ResourceGroup, ContainerAppEnvironment, ContainerRegistry, LogAnalyticsWorkspace, and ManagedIdentity?

Kumima avatar Sep 28 '24 02:09 Kumima

We’re scoping the feature to just the container app for aspire 9. The idea is to design the feature in such a way that we can gradually remove more bicep generation from azd. That will take several releases to get right

davidfowl avatar Sep 28 '24 03:09 davidfowl