Connect a container app to a csloud service with Service Connector
Azure Container Apps allows you to use Service Connector to connect to cloud services in just a few steps. Service Connector manages the configuration of the network settings and connection information between different services.
In this article, you learn to connect a container app to Azure Blob Storage.
Important
This feature in Container Apps is currently in preview. See the Supplemental Terms of Use for Azure Previews for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
Prerequisites
An Azure account with an active subscription. Create a trial subscription.
An application deployed to Container Apps in a region supported by Service Connector . If you don't have one yet, create and deploy a container to Container Apps
An Azure Blob Storage account
Sign in to Azure
First, sign in to Azure.
Sign in to the Azure portal at https://portal.azure.cn/ with your Azure account.
Create a new service connection
Use Service Connector to create a new service connection in Container Apps using the Azure portal or the CLI.
Navigate to the Azure portal.
Select All resources on the left of the Azure portal.
Enter Container Apps in the filter and select the name of the container app you want to use in the list.
Select Service Connector from the left table of contents.
Select Create.
Select or enter the following settings.
Setting Suggested value Description Container Your container name Select your Container Apps. Service type Blob Storage This is the target service type. If you don't have a Storage Blob container, you can create one or use another service type. Subscription One of your subscriptions The subscription containing your target service. The default value is the subscription for your container app. Connection name Generated unique name The connection name that identifies the connection between your container app and target service. Storage account Your storage account name The target storage account to which you want to connect. If you choose a different service type, select the corresponding target service instance. Client type The app stack in your selected container Your application stack that works with the target service you selected. The default value is none, which generates a list of configurations. If you know about the app stack or the client SDK in the container you selected, select the same app stack for the client type. Select Next: Authentication to select the authentication type. Then select Connection string to use access key to connect your Blob Storage account.
Select Next: Network to select the network configuration. Then select Enable firewall settings to update firewall allowlist in Blob Storage so that your container apps can reach the Blob Storage.
Then select Next: Review + Create to review the provided information. Running the final validation takes a few seconds. Then select Create to create the service connection. It might take a minute or so to complete the operation.
View service connections in Container Apps
View your existing service connections using the Azure portal or the CLI.
In Service Connector, select Refresh and you see a Container Apps connection displayed.
Select > to expand the list. You can see the environment variables required by your application code.
Select ... and then Validate. You can see the connection validation details in the pop-up panel on the right.