Allow configuration of Azure container app resource allocation in code
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### 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.
Based on discussion https://github.com/dotnet/aspire/discussions/2069
I would like to configure CPU and memory usage in code (e.g., in `Program.cs`) for Aspire projects, without relying solely on Azure-specific or YAML-based configuration. Currently, there appears to be no built-in way to do this within Aspire itself.
### Describe the solution you'd like
Introduce an API or extension methods in Aspire that let developers specify CPU and memory limits directly in code. This approach would allow local or code-based configuration that mimics production-like settings.
### Additional context
I initially thought this might be possible using [Azure.Provisioning](https://github.com/Azure/azure-sdk-for-net/blob/Azure.Provisioning_1.0.0/sdk/provisioning/Azure.Provisioning/README.md), but after looking more closely, it seems Aspire does not expose CPU/memory configuration in code. Adding such functionality would greatly improve our development workflow.
Contributor guide
Assessment
This issue has not been assessed yet.