aws-dotnet-extensions-configuration
aws-dotnet-extensions-configuration copied to clipboard
Parse Json param with fallback to default way of parsing i.e. string or stringList
Description
Processes a collection of AWS Systems Manager (SSM) Parameters Store parameters, converting them into a dictionary of strings.
This method supports both JSON-formatted parameters as per JsonParameterProcessor
. And plain string & StringList as per DefaultParameterProcessor
.
The resulting dictionary keys are case-insensitive, as the other 2 implemenation.
Motivation and Context
We have multiple types of SSM gets loaded during application startup. Mainly Json and Text based. Params are dynamic in nature, so no way to telling if its Json or Text.
We are using this code for more than a week now, so why not merge it in the lib itself.
Testing
- Tested in our net8.0 application already. It runs on official docker image
mcr.microsoft.com/dotnet/aspnet:8.0-jammy
- Tested in net6.0 locally
- Couldn't test on other 2 version for
netstandard2.0;netcoreapp3.1
as using ARM
Unit tests have been added, validated.
No impact on existing area as new implementation of the IParameterProcessor
Screenshots (if appropriate)
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [x] My code follows the code style of this project
- [ ] My change requires a change to the documentation
- [ ] I have updated the documentation accordingly
- [x] I have read the README document
- [x] I have added tests to cover my changes
- [x] All new tests passed
- [ ] All existing tests passed
License
- [x] I confirm that this pull request can be released under the Apache 2 license