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

Allow defining service groups where cross cutting configuration can be applied #521

Open
davidfowl opened this issue Oct 26, 2023 · 1 comment
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-app-model-offsite feature A single user-facing feature. Can be grouped under an epic.
Milestone

Comments

@davidfowl
Copy link
Member

If I want to apply environment variables to a set of services, it should be possible to configure them in a group where those get applied. e.g.

Today

var builder = DistributedApplication.CreateBuilder();

builder.AddProject<P1>()
       .WithEnvironment("shared", "shared value")
       .WithEnvironment("unique", "1") ;

builder.AddProject<P2>()
       .WithEnvironment("shared", "shared value")
       .WithEnvironment("unique", "2") ;


builder.AddProject<P3>()
       .WithEnvironment("shared", "shared value")
       .WithEnvironment("unique", "3") ;

builder.Build().Run();

After

var builder = DistributedApplication.CreateBuilder();

var group = builder.CreateGroup();

group.WithEnvironment("shared", "shared value");

group.AddProject<P1>()
     .WithEnvironment("unique", "1") ;

group.AddProject<P2>()
     .WithEnvironment("unique", "2") ;

group.AddProject<P3>()
     .WithEnvironment("unique", "3") ;

builder.Build().Run();
@davidfowl davidfowl added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Oct 26, 2023
@danmoseley danmoseley added this to the some time after preview milestone Nov 3, 2023
@danmoseley danmoseley removed this from the needs milestone (for GA) milestone Nov 13, 2023
@davidfowl davidfowl added the feature A single user-facing feature. Can be grouped under an epic. label Nov 24, 2023
@davidfowl davidfowl added this to the backlog milestone Nov 24, 2023
@mitchdenny
Copy link
Member

Do you want this in GA, I'm assuming this is post GA now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-app-model-offsite feature A single user-facing feature. Can be grouped under an epic.
Projects
None yet
Development

No branches or pull requests

3 participants