You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[AppConfiguration](https://docs.microsoft.com/en-us/azure/azure-app-configuration/overview) is a new offering from Azure, currently in preview. If you
187
-
wish to use this new service for managing your configuration, then use this AzureAppConfigurationBuilder. Either `endpoint` or `connectionString` are
188
-
required, but all other attributes are optional. If both `endpoint` and `connectionString` are used, then preference is given to the connection string.
189
-
It is however, __strongly__ encouraged to use `endpoint` with a managed service identity in Azure.
187
+
wish to use this new service for managing your configuration, then use this AzureAppConfigurationBuilder. `endpoint` is
188
+
required, but all other attributes are optional.
189
+
Previous iterations of this config builder allowed for a `connectionString` to connect to the
190
+
App Configuration service. This method is no longer allowed, and this config builder now exclusively uses [DefaultAzureCredential](https://docs.microsoft.com/en-us/dotnet/api/azure.identity.defaultazurecredential)
191
+
from the Azure.Identity package to handle credentials for connecting to the service.
190
192
*`endpoint` - This specifies the AppConfiguration store to connect to.
191
-
*`connectionString` - This specifies the AppConfiguration store to connect to, along with the Id and Secret necessary to access the service.
192
193
*`keyFilter` - Use this to select a set of configuration values matching a certain key pattern.
193
194
*`labelFilter` - Only retrieve configuration values that match a certain label.
194
195
*`acceptDateTime` - Instead of versioning ala Azure Key Vault, AppConfiguration uses timestamps. Use this attribute to go back in time
@@ -202,21 +203,20 @@ It is however, __strongly__ encouraged to use `endpoint` with a managed service
If your secrets are kept in Azure Key Vault, then this config builder is for you. There are three additional attributes for this config builder. The `vaultName` is
211
-
required. The other attributes allow you some manual control about which vault to connect to, but are only necessary if the application is not running in an
212
-
environment that works magically with `Microsoft.Azure.Services.AppAuthentication`. The Azure Services Authentication library is used to automatically pick
213
-
up connection information from the execution environment if possible, but you can override that feature by providing a connection string instead.
214
-
*`vaultName` - This is a required attribute. It specifies the name of the vault in your Azure subscription from which to read key/value pairs.
215
-
*`connectionString` - A connection string usable by [AzureServiceTokenProvider](https://docs.microsoft.com/en-us/azure/key-vault/service-to-service-authentication#connection-string-support)
216
-
*`uri` - Connect to other Key Vault providers with this attribute. If not specified, Azure is the assumed Vault provider. If the uri _is_specified, then `vaultName` is no longer a required parameter.
210
+
If your secrets are kept in Azure Key Vault, then this config builder is for you. There are three additional attributes for this config builder. The `vaultName`
211
+
(or `uri`) is required. Previous iterations of this config builder allowed for a `connectionString` as a way to supply credential information for connecting to
212
+
Azure Key Vault. This method is no longer allowed as it is not a supported scenario for the current `Azure.Identity` SDK which is used for connecting
213
+
to Azure services. Instead, this iteration of the config builder exclusively uses [DefaultAzureCredential](https://docs.microsoft.com/en-us/dotnet/api/azure.identity.defaultazurecredential)
214
+
from the `Azure.Identity` package to handle credentials for connecting to Azure Key Vault.
215
+
*`vaultName` - This (or `uri`) is a required attribute. It specifies the name of the vault in your Azure subscription from which to read key/value pairs.
216
+
*`uri` - Connect to non-Azure Key Vault providers with this attribute. If not specified, Azure is the assumed Vault provider. If the uri _is_ specified, then `vaultName` is no longer a required parameter.
217
217
*`version` - Azure Key Vault provides a versioning feature for secrets. If this is specified, the builder will only retrieve secrets matching this version.
218
-
*`preloadSecretNames` - By default, this builder will query __all__ the key names in the key vault when it is initialized. If this is a concern, set
219
-
this attribute to 'false', and secrets will be retrieved one at a time. This could also be useful if the vault allows "Get" access but not
218
+
*`preloadSecretNames` - By default, this builder will query __all__ the key names in the key vault when it is initialized to improve performance. If this is
219
+
a concern, set this attribute to 'false', and secrets will be retrieved one at a time. This could also be useful if the vault allows "Get" access but not
220
220
"List" access. (NOTE: Disabling preload is incompatible with Greedy mode.)
221
221
Tip: Azure Key Vault uses random per-secret Guid assignments for versioning, which makes specifying a secret `version` tag on this builder rather
222
222
limiting, as it will only ever update one config value. To make version handling more useful, V2 of this builder takes advantage of the new key-updating
thrownewArgumentException($"An endpoint URI or connection string must be provided for connecting to Azure App Configuration service via the '{endpointTag}' or '{connectionStringTag}' attributes.");
96
+
if(!Optional)
97
+
thrownewArgumentException($"Exception encountered while creating connection to Azure App Configuration store.",ex);
110
98
}
111
99
}
112
100
else
113
101
{
114
-
// If we get here, then we should try to connect with a connection string.
[ParameterDescription]@{ Name="connectionString"; IsRequired=$false },# Obsolete, but don't complain about it here. Still preserve it so people can revert back to the version that allows this.
0 commit comments