|
8 | 8 | <section name="configBuilders" type="System.Configuration.ConfigurationBuildersSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" restartOnExternalChanges="false" requirePermission="false" /> |
9 | 9 | </configSections> |
10 | 10 |
|
| 11 | + <!-- For the KeyVault builders, imagine this is the vault: |
| 12 | + |
| 13 | + Key Version Current Value |
| 14 | + Secret1 e73e9c1ca0ae40f0882ff7f55c5f6036 * Lastest1 |
| 15 | + Secret1 d14197de791c4ffe8e79bc7fc0f766b0 First1 |
| 16 | + STwo e899b8a83eb44e4baeceabf8ec0b3ece * Lastest2 |
| 17 | + STwo 0de51928e49144ce86eb1de9056ac937 Second2 |
| 18 | + STwo 63e11b20b386418d81618da23482534e First2 |
| 19 | + ThrdScrt fca9f1b9d993414cb8bc807fb613baaf * Lastest3 |
| 20 | + |
| 21 | + --> |
| 22 | + |
11 | 23 | <configBuilders> |
12 | 24 | <builders> |
13 | | - <add name="Environment" type="Microsoft.Configuration.ConfigurationBuilders.EnvironmentConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Environment, Version=1.0.0.0, Culture=neutral" /> |
14 | | - <!-- <add name="Environment" mode="Expand" type="Microsoft.Configuration.ConfigurationBuilders.EnvironmentConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Environment, Version=1.0.0.0, Culture=neutral"/> --> |
15 | | - <add name="Secrets" userSecretsFile="~/App_Data/secrets.xml" mode="Greedy" type="Microsoft.Configuration.ConfigurationBuilders.UserSecretsConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.UserSecrets, Version=1.0.0.0, Culture=neutral" /> |
16 | | - <add name="SimpleJson" jsonFile="~/App_Data/settings.json" ignoreMissingFile="true" type="Microsoft.Configuration.ConfigurationBuilders.SimpleJsonConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Json, Version=1.0.0.0, Culture=neutral" /> |
17 | | - <add name="KeyPerFile" directoryPath="~/../KeyPerFileSampleRoot" mode="Strict" keyDelimiter="--" type="Microsoft.Configuration.ConfigurationBuilders.KeyPerFileConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.KeyPerFile, Version=1.0.0.0, Culture=neutral" /> |
18 | | - </builders> |
| 25 | + <add name="Environment" type="Microsoft.Configuration.ConfigurationBuilders.EnvironmentConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Environment, Version=2.0.0.0, Culture=neutral" /> |
| 26 | + <add name="Secrets" userSecretsFile="~/App_Data/secrets.xml" mode="Greedy" type="Microsoft.Configuration.ConfigurationBuilders.UserSecretsConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.UserSecrets, Version=2.0.0.0, Culture=neutral" /> |
| 27 | + <add name="SimpleJson" jsonFile="${JSONConfigFile}" optional="true" type="Microsoft.Configuration.ConfigurationBuilders.SimpleJsonConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Json, Version=2.0.0.0, Culture=neutral" /> |
| 28 | + <add name="KeyPerFile" directoryPath="~/../KeyPerFileSampleRoot" mode="Strict" keyDelimiter="--" type="Microsoft.Configuration.ConfigurationBuilders.KeyPerFileConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.KeyPerFile, Version=2.0.0.0, Culture=neutral" /> |
| 29 | + |
| 30 | + <add name="KV1" vaultName="${ConfigBuilderTestKeyVaultName}" type="Microsoft.Configuration.ConfigurationBuilders.AzureKeyVaultConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Azure, Version=2.0.0.0, Culture=neutral" /> |
| 31 | + <add name="KV2" vaultName="${ConfigBuilderTestKeyVaultName}" version="d14197de791c4ffe8e79bc7fc0f766b0" type="Microsoft.Configuration.ConfigurationBuilders.AzureKeyVaultConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Azure, Version=2.0.0.0, Culture=neutral" /> |
| 32 | + <add name="KV3" vaultName="${ConfigBuilderTestKeyVaultName}" mode="Greedy" type="Microsoft.Configuration.ConfigurationBuilders.AzureKeyVaultConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Azure, Version=2.0.0.0, Culture=neutral" /> |
| 33 | + <add name="KV4" vaultName="${ConfigBuilderTestKeyVaultName}" mode="Greedy" version="0de51928e49144ce86eb1de9056ac937" type="Microsoft.Configuration.ConfigurationBuilders.AzureKeyVaultConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Azure, Version=2.0.0.0, Culture=neutral" /> |
| 34 | + |
| 35 | + <add name="AS_Sub_Test" optional="${Boolean}" type="Microsoft.Configuration.ConfigurationBuilders.EnvironmentConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Environment, Version=2.0.0.0, Culture=neutral" /> |
| 36 | + </builders> |
19 | 37 | </configBuilders> |
20 | 38 |
|
21 | | - <appSettings configBuilders="Environment,SimpleJson,Secrets,KeyPerFile"> |
| 39 | + <appSettings configBuilders="Environment,Secrets,SimpleJson,KeyPerFile"> |
22 | 40 | <add key="WINDIR" value="Will be replaced by 'Environment' in Strict and Greedy modes." /> |
23 | 41 | <add key="SYSTEMDRIVE" value="Will initally be replaced by 'Environment' in Strict and Greedy modes... but then superceded by 'Secrets' in the same modes." /> |
24 | 42 | <add key="Value_Replaced_By_Environment_In_Expand_Mode" value="${WINDIR}" /> |
|
36 | 54 | <add key="SECRETFROMFILE2" value="As will this one." /> |
37 | 55 | <add key="SubFeature--FeatureSecretA" value="This will be replaced by KeyPerFile if keyDelimiter is set to '--'." /> |
38 | 56 | <add key="ignore.secretfromfile3" value="This value should be left alone." /> |
| 57 | + |
| 58 | + <add key="Secret1" value="Last writer wins. KV1:Latest1, KV2:First1, KV3:Latest1, (KV4-untouched because it's version doesn't exist for this secret.)" /> |
| 59 | + <add key="Secret2/63e11b20b386418d81618da23482534e" value="KV1 and KV3 get one chance to update this to 'Secret2:First2'. KV2 and KV4 don't touch ever due to mismatched versions." /> |
| 60 | + <!-- key="Secret2" value="However, if the above does get updated to 'Secret2' with no version attached, it is then fair game for updates. KV1:Latest2,KV3:Latest2,KV4:Second2. KV2 won't update because its version doesn't exist for this secret." --> |
| 61 | + <!-- key="Secret2" value=" If the above does NOT get renamed to 'Secret2' though, then 'Secret2' will still get added IN ADDITION to the above by KV3:Latest2 or KV4:Second2." --> |
| 62 | + <!-- key="Secret3" value="Will be added by KV3:Latest3. IFF already added, will be "updated" by KV1 to Latest3. KV2 and KV4 don't have versions matching this secret." --> |
39 | 63 | </appSettings> |
40 | 64 |
|
41 | 65 | <connectionStrings configBuilders="SimpleJson"> |
|
72 | 96 | </runtime> |
73 | 97 | <system.codedom> |
74 | 98 | <compilers> |
75 | | - <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" /> |
76 | | - <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" /> |
| 99 | + <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" /> |
| 100 | + <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" /> |
77 | 101 | </compilers> |
78 | 102 | </system.codedom> |
79 | 103 | </configuration> |
0 commit comments