Skip to content

Commit fa5cb8f

Browse files
Merge pull request #291811 from maud-lv/ml-appconfigcontainer-apps
Update quickstart-container-apps to use endpoint
2 parents 74014dc + 7e1457f commit fa5cb8f

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

articles/azure-app-configuration/quickstart-container-apps.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ author: maud-lv
66
ms.service: azure-app-configuration
77
ms.custom: service-connector
88
ms.topic: quickstart
9-
ms.date: 03/02/2023
9+
ms.date: 12/11/2024
1010
ms.author: malev
1111

1212
---
1313

1414
# Quickstart: Use Azure App Configuration in Azure Container Apps
1515

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.
1717

1818
> [!TIP]
1919
> 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
2828

2929
## Connect Azure App Configuration to the container app
3030

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.
3232

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.
3634

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.
3839

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":::
4341

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.
4552

4653
## Build a container
4754

@@ -164,7 +171,7 @@ The web page looks like this:
164171
165172
[!INCLUDE [Azure App Configuration cleanup](../../includes/azure-app-configuration-cleanup.md)]
166173
167-
## Next steps
174+
## Related content
168175
169176
In this quickstart, you:
170177
@@ -175,7 +182,7 @@ In this quickstart, you:
175182
- Added the container image to Azure Container Apps
176183
- Browsed to the URL of the Azure Container Apps instance updated with the settings you configured in your App Configuration store.
177184
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).
179186
180187
To learn how to configure your ASP.NET Core web app to dynamically refresh configuration settings, continue to the next tutorial.
181188

0 commit comments

Comments
 (0)