Take AWS options from appsettings
See original GitHub issueThis is a nice little library, but one issue that I’m having is that it doesnt take AWS options from appsettings. What are your thoughts on supporting this?
For example, if I have the following in my appsettings file, I’d want this information to be used when creating the Secrets Manager client:
{
"AWS": {
"Region": "eu-west-1",
"Profile": "dev",
}
}
At the moment, it only seems to use the information in the credentials
file, or if the AWS_PROFILE
or AWS_REGION
environment variable are present, it’ll use the information from there.
The AWS .NET Configuration Extension for Systems Manager has an AddSystemsManager
method which builds the IConfigurationBuilder
and fetches the AWSOptions from it by IConfiguration.GetAWSOptions()
, which allows these options to come from appsettings. I’m wondering if it would be possible to support something similar in this library.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (9 by maintainers)
@devklick thanks for your effort. Usually when I have to test stuff that uses
Microsoft.Extensions.Configuration
andMicrosoft.Extensions.DependencyInjection
I end up using the concrete types rather than mocking the interfaces. I am aware it pushes towards integration tests but I prefer that to having complicated but “pure” unit tests.When it comes to
Configuration
, I rely on the in-memory provider or theAddObject
library I have here.As for your work in progress, would you mind pushing your branch as a draft PR?
Yeah sorry for confusion, personal and work account 😃