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

Support secrets in app model environment settings. #166

Closed
mitchdenny opened this issue Sep 26, 2023 · 2 comments
Closed

Support secrets in app model environment settings. #166

mitchdenny opened this issue Sep 26, 2023 · 2 comments
Assignees
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Comments

@mitchdenny
Copy link
Member

mitchdenny commented Sep 26, 2023

At the moment in the app model we do the following methods to populate environment variables:

WithEnviroment(string, string)
WithEnvironment(string, Func<string>)
WithEnvironment(Action<Dictionary<string, string>)

I think that we'll probably end up having to add:

WithEnvironment(string, string, EnvironmentHandling) // enum EnvironmenHandling { Secret, NotSecret }
WithEnvironment(string, Func<string>, EnvironmentHandling)
WithEnvironment(Action<EnvironmentContext>)

Usage on that last one:

WithEnvironment((env) => {
  env.AddVariable("FOO", "bar");
  env.AddSecret("BAR", "foo");
});

Most orchestrators have this concept of something that is mapped as an environment variable but is otherwise handled as a secret throughout the platform.

@davidfowl
Copy link
Member

This is going to be important, but I think we can look at it post preview.

@danmoseley danmoseley transferred this issue from another repository Oct 9, 2023
@danmoseley danmoseley added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Oct 12, 2023
@davidfowl davidfowl added this to the some time after preview milestone Oct 13, 2023
@danmoseley danmoseley removed this from the needs milestone (for GA) milestone Nov 13, 2023
@davidfowl davidfowl added this to the preview 3 (Jan) milestone Nov 24, 2023
@mitchdenny mitchdenny self-assigned this Jan 2, 2024
@mitchdenny
Copy link
Member Author

Closing in vavor of #770

@github-actions github-actions bot locked and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

No branches or pull requests

3 participants