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
Copy file name to clipboardExpand all lines: articles/app-service/app-service-configuration-references.md
+17-15Lines changed: 17 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,11 +50,13 @@ This configuration applies to all references in this app.
50
50
In addition to storing raw configuration values, App Configuration has its own format for storing [Azure Key Vault references][app-config-key-vault-references]. If the value of an App Configuration reference is a Key Vault reference in the App Configuration store, your app also must have permissions to access the key vault that's specified in the reference.
51
51
52
52
> [!NOTE]
53
-
> The concept of [App Configuration Key Vault references][app-config-key-vault-references] shouldn't be confused with the concept of [App Service and Azure Functions Key Vault references][app-service-key-vault-references]. Your app can use any combination of these references, but there are some important differences. If your vault needs to be network restricted or if you need the app to periodically update to latest versions, consider using the App Service and Azure Functions direct approach instead of using an App Configuration reference.
53
+
> [App Configuration Key Vault references][app-config-key-vault-references] shouldn't be confused with [App Service and Azure Functions Key Vault references][app-service-key-vault-references]. Your app can use any combination of these references, but there are some important differences. If your vault needs to be network restricted or if you need the app to periodically update to the latest versions, consider using the App Service and Azure Functions approach instead of using an App Configuration reference.
1. Identify the identity that you used for the App Configuration reference. You must grant vault access to the same identity.
59
61
60
62
1. Create an [access policy in Key Vault](/azure/key-vault/general/security-features#privileged-access) for that identity. Enable the *Get* secret permission on this policy. Don't configure the *authorized application* or the `applicationId` settings because they aren't compatible with a managed identity.
@@ -65,11 +67,11 @@ An App Configuration reference has the form `@Microsoft.AppConfiguration({refere
> | `Endpoint` = `<endpointURL>` | `Endpoint` is the required part of the reference string. The value for `Endpoint` should include the URL of your App Configuration resource. |
71
-
> | `Key` = `<myAppConfigKey>` | `Key` forms the required part of the reference string. The value for `Key` is the name of the key that you want to assign to the app setting. |
72
-
> | `Label` = `<myKeyLabel>` | `Label` is optional in the reference string. `Label` should be the value of the key label specified in `Key`. |
70
+
> | Reference string part | Description |
71
+
> |--|----|
72
+
> | `Endpoint` = `<endpointURL>` | `Endpoint` (required). The URL of your App Configuration resource. |
73
+
> | `Key` = `<myAppConfigKey>` | `Key` (required). The name of the key that you want to assign to the app setting. |
74
+
> | `Label` = `<myKeyLabel>` | `Label` (optional). The value of the key label that's specified in `Key`. |
73
75
74
76
Here's an example of a complete reference that includes `Label`:
75
77
@@ -86,13 +88,13 @@ Here's an example that doesn't include `Label`:
86
88
Any configuration change to the app that results in a site restart causes an immediate refetch of all referenced key/value pairs from the App Configuration store.
87
89
88
90
> [!NOTE]
89
-
> Automatic refresh and refetch of these values when the key/value pairs are updated in App Configuration currently isn't supported.
91
+
> Automatic refresh and refetch of these values when the key/value pairs are updated in App Configuration isn't currently supported.
90
92
91
93
## Source application settings from App Configuration
92
94
93
-
You can use App Configuration references as values for [application settings](configure-common.md#configure-app-settings), so you can keep configuration data in App Configuration instead of in the site configuration settings. Application settings and App Configuration key/value pairs both are securely encrypted at rest. If you need centralized configuration management capabilities, add configuration data to App Configuration.
95
+
You can use App Configuration references as values for [application settings](configure-common.md#configure-app-settings) so you can keep configuration data in App Configuration instead of in the site configuration settings. Application settings and App Configuration key/value pairs are both securely encrypted at rest. If you need centralized configuration management capabilities, add configuration data to App Configuration.
94
96
95
-
To use an App Configuration reference for an [app setting](configure-common.md#configure-app-settings), set the reference as the value of the setting. Your app can reference the Configuration value through its key as usual. No code changes are required.
97
+
To use an App Configuration reference for an [app setting](configure-common.md#configure-app-settings), set the reference as the value of the setting. Your app can reference the configuration value through its key as usual. No code changes are required.
96
98
97
99
> [!TIP]
98
100
> Most application settings that use App Configuration references should be marked as slot settings so that you have separate stores or labels for each environment.
@@ -106,13 +108,13 @@ If you use App Configuration references for this setting, this validation check
106
108
> [!CAUTION]
107
109
> If you skip validation and either the connection string or the content share is invalid, the app can't start properly and serves only HTTP 500 errors.
108
110
109
-
As part of creating the site, mounting the content share might fail if managed identity permissions aren't propagated or if the virtual network integration isn't set up. You can defer setting up Azure Files until later in the deployment template to accommodate for the required setup. For more information, see [Azure Resource Manager deployment](#azure-resource-manager-deployment). App Service uses only a default file system until Azure Files is set up, and files aren't copied over. Ensure that no deployment attempts occur during the interim period before Azure Files is mounted.
111
+
When you create a site, mounting the content share might fail if managed identity permissions aren't propagated or if the virtual network integration isn't set up. You can defer setting up Azure Files until later in the deployment template to accommodate for the required setup. For more information, see [Azure Resource Manager deployment](#azure-resource-manager-deployment). App Service uses only a default file system until Azure Files is set up, and files aren't copied over. Ensure that no deployment attempts occur during the interim period before Azure Files is mounted.
110
112
111
113
### Azure Resource Manager deployment
112
114
113
-
If you automate resource deployments by using Azure Resource Manager templates, you might need to sequence your dependencies in a specific order to make this feature work. In that scenario, you must define your application settings as their own resource instead of using a `siteConfig` property in the site definition. The site must be defined first so that the system-assigned identity is created with the site. The managed identity is then used in the access policy.
115
+
If you automate resource deployments by using Azure Resource Manager (ARM) templates, you might need to sequence your dependencies in a specific order to make App Configuration refercnces work. In that scenario, you must define your application settings as their own resource instead of using a `siteConfig` property in the site definition. The site must be defined first so that the system-assigned identity is created with the site. The managed identity is then used in the access policy.
114
116
115
-
Here's a demonstration template for a function app that has App Configuration references:
117
+
Here's a sample template for a function app that has App Configuration references:
116
118
117
119
```json
118
120
{
@@ -237,13 +239,13 @@ Here's a demonstration template for a function app that has App Configuration re
237
239
```
238
240
239
241
> [!NOTE]
240
-
> In this example, source control deployment depends on the application settings. In most scenarios, this sequence is less secure because app settings updates asynchronously. But because we included the `WEBSITE_ENABLE_SYNC_UPDATE_SITE` application setting, the update is synchronous. Source control deployment begins only after the application settings are fully updated. For more information about app settings, see [Environment variables and app settings in Azure App Service](reference-app-settings.md).
242
+
> In this example, source control deployment depends on the application settings. In most scenarios, this sequence is less secure because app settings update asynchronously. But because the example includes the `WEBSITE_ENABLE_SYNC_UPDATE_SITE` application setting, the update is synchronous. Source control deployment begins only after the application settings are fully updated. For more information about app settings, see [Environment variables and app settings in Azure App Service](reference-app-settings.md).
241
243
242
244
## Troubleshoot app configuration references
243
245
244
-
If a reference isn't resolved properly, the reference value is used instead. For an application setting in this scenario, an environment variable that uses the syntax `@Microsoft.AppConfiguration(...)` is created. The reference might cause an error because the application was expecting a configuration value.
246
+
If a reference isn't resolved properly, the reference value is used instead. An environment variable that uses the syntax `@Microsoft.AppConfiguration(...)` is created. The reference might cause an error because the application was expecting a configuration value.
245
247
246
-
This error most commonly is the result of a misconfiguration of the [App Configuration access policy](#grant-app-access-to-app-configuration). But it also might occur if there's a syntax error in the reference or if the configuration key/value pair doesn't exist in the store.
248
+
This error is most commonly the result of a misconfiguration of the [App Configuration access policy](#grant-app-access-to-app-configuration). But it might also occur if there's a syntax error in the reference or if the configuration key/value pair doesn't exist in the store.
0 commit comments