Today in AppHost projects, resources are typically configured by calling WithEnvironment to inject an environment variable with a specific value into the resource's model. We should consider adding a layer above this logically based on the existing IConfiguration system from Microsoft.Extensions.Configuration, facilitating the separation of a resource specifying it requires some configuration value and where that value actually comes from.
This could then be coupled with a generic concept of tags for configuration values such that values with a specific tag could be supplied from a specific provider/store, e.g. configuration values tagged as "secret" could be stored in/supplied from user secrets when running locally, and a secret store (e.g. Azure KeyVault) when publishing.
Today in AppHost projects, resources are typically configured by calling
WithEnvironment
to inject an environment variable with a specific value into the resource's model. We should consider adding a layer above this logically based on the existingIConfiguration
system fromMicrosoft.Extensions.Configuration
, facilitating the separation of a resource specifying it requires some configuration value and where that value actually comes from.This could then be coupled with a generic concept of tags for configuration values such that values with a specific tag could be supplied from a specific provider/store, e.g. configuration values tagged as "secret" could be stored in/supplied from user secrets when running locally, and a secret store (e.g. Azure KeyVault) when publishing.