You are deploying an Azure Container App named report-generator to an Azure Container Apps Environment. The Container App must read template files and write generated reports to a persistent, shared file share. You have already created an Azure Storage account. You need to configure the Container App to mount the Azure file share. Which sequence of steps should you perform?
- 1Create an Azure file share in the Azure Storage account.
- 2Link the Azure file share to the Container Apps Environment using the az containerapp env storage set command.
- 3Define a volume in the Container App's YAML configuration template that references the registered Environment storage resource.
- 4Configure a volume mount in the container properties of the template to map the defined volume to a target directory path.
Answer
First, create an Azure file share in the Storage account. Second, link the file share to the Container Apps Environment. Third, define a volume in the Container App configuration referencing the environment storage. Fourth, configure a volume mount in the container template to bind the volume to a directory path.
The correct sequence starts with provisioning the physical Azure File Share, registering it at the environment level to expose it to the container apps, defining the volume resource in the container app's template, and finally mapping that volume to a path within the container.
Step-by-Step Solution
Key Concept
Azure Container Apps storage mounting requires linking the Azure file share at the Container Apps Environment level before defining it as a volume and mounting it inside individual containers.