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/azure-app-configuration/quickstart-container-apps.md
+21-14Lines changed: 21 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,14 @@ author: maud-lv
6
6
ms.service: azure-app-configuration
7
7
ms.custom: service-connector
8
8
ms.topic: quickstart
9
-
ms.date: 03/02/2023
9
+
ms.date: 12/11/2024
10
10
ms.author: malev
11
11
12
12
---
13
13
14
14
# Quickstart: Use Azure App Configuration in Azure Container Apps
15
15
16
-
In this quickstart, you will use Azure App Configuration in an app running in Azure Container Apps. This way, you can centralize the storage and management of the configuration of your apps in Container Apps. This quickstart leverages the ASP.NET Core app created in [Quickstart: Create an ASP.NET Core app with App Configuration](./quickstart-aspnet-core-app.md). You will containerize the app and deploy it to Azure Container Apps. Complete the quickstart before you continue.
16
+
In this quickstart, you use Azure App Configuration in an app running in Azure Container Apps. This way, you can centralize the storage and management of the configuration of your apps in Container Apps. This quickstart leverages the ASP.NET Core app created in [Quickstart: Create an ASP.NET Core app with App Configuration](./quickstart-aspnet-core-app.md). You containerize the app and deploy it to Azure Container Apps. Complete the quickstart before you continue.
17
17
18
18
> [!TIP]
19
19
> While following this quickstart, preferably register all new resources within a single resource group, so that you can regroup them all in a single place and delete them faster later on if you don't need them anymore.
@@ -28,20 +28,27 @@ In this quickstart, you will use Azure App Configuration in an app running in Az
28
28
29
29
## Connect Azure App Configuration to the container app
30
30
31
-
In the Azure portal, navigate to your Container App instance. Follow the [Service Connector quickstart for Azure Container Apps](../service-connector/quickstart-portal-container-apps.md) to create a service connection with your App Configuration store using the settings below.
31
+
1.In the Azure portal, navigate to your Container App instance.
32
32
33
-
- In the **Basics** tab:
34
-
- select **App Configuration** for **Service type**
35
-
- pick your App Configuration store for "**App Configuration**"
33
+
1. Follow the [Service Connector quickstart for Azure Container Apps](../service-connector/quickstart-portal-container-apps.md) to create a service connection for your App Configuration store, using the following settings.
36
34
37
-
:::image type="content" border="true" source="media\connect-container-app\use-service-connector.png" alt-text="Screenshot the Azure platform showing a form in the Service Connector menu in a Container App." lightbox="media\connect-container-app\use-service-connector.png":::
35
+
1. In the **Basics** tab:
36
+
37
+
- Under **Service type**, select **App Configuration**
38
+
- Under **App Configuration**, select your App Configuration store.
38
39
39
-
- In the **Authentication** tab:
40
-
- pick **Connection string** authentication type and **Read-Only** for "**Permissions for the connection string**
41
-
- expand the **Advanced** menu. In the Configuration information, there should be an environment variable already created called "AZURE_APPCONFIGURATION_CONNECTIONSTRING". Edit the environment variable by selecting the icon on the right and change the name to *ConnectionStrings__AppConfig*. We need to make this change as *ConnectionStrings__AppConfig* is the name of the environment variable the application built in the [ASP.NET Core quickstart](./quickstart-aspnet-core-app.md) will look for. This is the environment variable which contains the connection string for App Configuration. If you have used another application to follow this quickstart, please use the corresponding environment variable name. Then select **Done**.
42
-
- Use default values for everything else.
40
+
:::image type="content" border="true" source="media\connect-container-app\use-service-connector.png" alt-text="Screenshot the Azure platform showing a form in the Service Connector menu in a Container App." lightbox="media\connect-container-app\use-service-connector.png":::
43
41
44
-
Once done, an environment variable named **ConnectionStrings__AppConfig** will be added to the container of your Container App. Its value is a reference of the Container App secret, the connection string of your App Configuration store.
42
+
1. In the **Authentication** tab:
43
+
44
+
- Select the **System-assigned managed identity** authentication type
45
+
- Expand the **Advanced** menu
46
+
- Assign your identity the **App Configuration Data Reader** role
47
+
- Under **Configuration information**, you find an environment variable named `AZURE_APPCONFIGURATION_ENDPOINT`. Select the pencil icon on the right and edit the environment variable name to match the variable name in your application that you load your App Configuration endpoint from. If you built your application following the [ASP.NET Core quickstart](./quickstart-aspnet-core-app.md), your variable name is `Endpoints:AppConfiguration`. When editing the variable name, replace the colon with double underscores so that it becomes `Endpoints__AppConfiguration`. If you're working with another application, enter the corresponding environment variable name, then select **Done**.
48
+
49
+
1. Use default values for everything else.
50
+
51
+
When the connection is created, an environment variable named `Endpoints__AppConfiguration` is added to the container of your Container App resource. Its value is a reference of the Container App secret, the endpoint of your App Configuration store.
- Added the container image to Azure Container Apps
176
183
- Browsed to the URL of the Azure Container Apps instance updated with the settings you configured in your App Configuration store.
177
184
178
-
The managed identity enables one Azure resource to access another without you maintaining secrets. You can streamline access from Container Apps to other Azure resources. For more information, see how to [access App Configuration using the managed identity](howto-integrate-azure-managed-service-identity.md) and how to [[access Container Registry using the managed identity](/azure/container-registry/container-registry-authentication-managed-identity)].
185
+
The managed identity enables one Azure resource to access another without you maintaining secrets. You can streamline access from Container Apps to other Azure resources. For more information, see how to [access App Configuration using the managed identity](howto-integrate-azure-managed-service-identity.md) and how to [access Container Registry using the managed identity](/azure/container-registry/container-registry-authentication-managed-identity).
179
186
180
187
To learn how to configure your ASP.NET Core web app to dynamically refresh configuration settings, continue to the next tutorial.
0 commit comments