Microsoft Azure – Mount Azure Storage in Container App In App Service
In this article, we are going to learn how to mount Azure Storage as a local share for App Services Linux web apps.
So to start the process of connecting to Azure Storage mount, you should click on configuration.
Once you are inside the configuration blade, click on path mappings. Start by giving it a name. For eg name it s1share. And you can see there are two options, basic and advanced. Now if you are connecting to a storage account that does not use service endpoints or private endpoints, you go with basic. Now select the storage account that you want to connect to. And you’ll see two storage types are supported, Azure Blob and Azure Files. Remember, Azure Blob is read-only, whereas Azure File provides you both read/write options. The next step is to select a corresponding file share that you would have created in the storage account. And now give the path that you want to mount. And another important point here is if you click on the small i option next to the mount path, Azure gives you in terms of helpful hints on what’s a valid and what’s an invalid mount path. Go ahead and click on OK.
Let’s look at another option. This time, give the name as log share and choose the different storage account. Now when you will choose the storage account you will get a message, which is failed to fetch storage account details.
Now the reason behind this error message is that the storage account behind the scene uses a private endpoint. So now select Azure files and click on advanced. Give it a share name and again give it a shared path. Click on OK.
Now, click on save, Before clicking on save, another important point to understand is you can see that you have connected to two different storage accounts and you can have up to five mounts, which could be from different storage accounts, and again you do have the option where your App Service web app is integrated to a VNet and you can connect to storage account using service endpoints or private endpoints, but you can also connect to storage accounts which do not use service endpoints or private endpoints.
Remember when you click on save, your app will get restarted. But a very important point to understand here is that your web app and the storage account need to be in the same virtual network. So use the same virtual network for your Azure web app and the storage account.
Now, these are some of the steps that you need to mount Azure Storage for your App Services web app on Linux.