Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 838 Bytes

README.md

File metadata and controls

27 lines (18 loc) · 838 Bytes

Doppler Secrets configuration provider for Microsoft.Extensions.Configuration

The Doppler.Extensions.Configuration package allows storing configuration values using Doppler Secrets.

Getting started

Install the package

Install the package with Nuget:

dotnet add package Doppler.Extensions.Configuration

Prerequisites

You need a Doppler account to use this package.

Examples

To load initialize configuration from Doppler secrets call the AddDoppler on ConfigurationBuilder:

ConfigurationBuilder builder = new ConfigurationBuilder();
builder.AddDoppler(builder.Configuration.GetValue<string>("Doppler:ServiceToken"))

IConfiguration configuration = builder.Build();
Console.WriteLine(configuration["MySecret"]);