In my CreateWebHostBuilder() method I've added the AWS Systems Manager Parameter Store as an additional source for Configuration Builder:
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args)
{
return WebHost.CreateDefaultBuilder(args)
.ConfigureAppConfiguration(builder =>
{
builder.AddSystemsManager("/ConfigureStoreName/");
})
.UseStartup<Startup>();
}
}
Instead of hardcoding "/ConfigureStoreName/" I'd like to make this a configuration value.
When I call .ConfigureAppConfiguration()
do I have access to the config values from appsettings.json that .CreateDefaultBuilder()
uses? If so how would I update my code to call it? If not what is the best approach to avoid using a static value in the CreateWebHostBuilder()
method?