AWS Secrets Manager configuration provider implementation for Microsoft.Extensions.Configuration.
$ dotnet add package PrincipleStudios.Extensions.Configuration.SecretsManagerAdd this package.
Add to your application's configuration builder.
For example, this will add a root Secrets:secret containing the value stored in the secret string within AWS SecretsManager at test/secret:
.AddSecretsManager(opt =>
{
opt.Region = "us-east-1";
opt.CredentialsProfile = "my-credentials-profile";
opt.Map = new ()
{
{ "Secrets:secret", new () { SecretId = "test/secret" } }
};
})
Use configuration as normal, including IOptionsMonitor<> to refresh from AWS periodically.
AmazonSecretsManagerConfig before the client is created.FormatTransformsIFormatTransform. Preregistered transforms include: