From 3321542a97b1deaf5f37a217776b9213accc9c49 Mon Sep 17 00:00:00 2001 From: Habib Ahmed Qureshi Date: Fri, 4 Dec 2020 20:01:40 +0100 Subject: [PATCH] CONNECTIONSTRING comes as CONNECTIONSTRINGS (#843) CONNECTIONSTRING comes as CONNECTIONSTRINGS in the environment variable. (Discovery during debugging tye run --debug (code is .NET 5.0.100) via System.Environment.GetEnvironmentVariable CONNECTIONSTRING__POSTGRES -> CONNECTIONSTRINGS__POSTGRES --- docs/reference/service_discovery.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/service_discovery.md b/docs/reference/service_discovery.md index cf6b0a6a..f1abd06b 100644 --- a/docs/reference/service_discovery.md +++ b/docs/reference/service_discovery.md @@ -193,14 +193,14 @@ The pattern for a default binding on the `postgres` service: | | Environment Variable | Configuration Key | |-------------------|------------------------------|----------------------------| -| Connection String | `CONNECTIONSTRING__POSTGRES` | `connectionstrings:postgres` | +| Connection String | `CONNECTIONSTRINGS__POSTGRES` | `connectionstrings:postgres` | The pattern for a named binding called `myBinding` on the `postgres` service: | | Environment Variable | Configuration Key | |-------------------|------------------------------|----------------------------| -| Connection String | `CONNECTIONSTRING__POSTGRES__MYBINDING` | `connectionstrings:postgres:mybinding` | +| Connection String | `CONNECTIONSTRINGS__POSTGRES__MYBINDING` | `connectionstrings:postgres:mybinding` | > :bulb: That's a double-underscore (`__`) in the environment variables. The `Microsoft.Extensions.Configuration` system uses double-underscore as a separator because single underscores are already common in environment variables.