Skip to content

aspire config set --secret? #10057

Open
Open
@mitchdenny

Description

@mitchdenny

There are places in Aspire where we read configuration values out of IConfiguration but generally speaking we expect the source for this information to be user secrets. A good example is when someone uses AddConnectionString(...).

Unfortunately the Aspire CLI doesn't really give you the ability manipulate user secrets. You could set a configuration values for a connection string but it would go into .aspire/settings.json.

I'm thinking that we should probably add first class secrets support to the aspire config command.

I think the way this would work is that if you specify --secret on the command-line instead of updating the config file, it would invoke dotnet user-secrets instead (using the app host project as context).

I don't know how this would work with polyglot app hosts though since the user secrets ID is embedded within the project file. Maybe we need to hoist that into .aspire/settings.json and pass it along when running the app host?

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions