In my storage account I've created an Azure Files share that I want to add to a Linux container that I already have deployed. What I want to do is redeploy the container using an ARM template with the file share mounted. How exactly to do this?
The existing template for the container looks like this (some fields anonymised) :
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"containerGroups_tds_name": {
"defaultValue": "tds",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2024-10-01-preview",
"name": "[parameters('containerGroups__name')]",
"location": <azure location>",
"properties": {
"sku": "Standard",
"containers": [
{
"name": "[parameters('containerGroups__name')]",
"properties": {
"image": "[concat(<image name>), ':latest')]",
"command": [
"/bin/bash",
"-c",
"echo Hello; service apache2 restart; sleep infinity"
],
"ports": [
{
"protocol": "TCP",
"port": 80
},
{
"protocol": "TCP",
"port": 19390
}
],
"environmentVariables": [],
"resources": {
"requests": {
"memoryInGB": 1.5,
"cpu": 1
}
}
}
}
],
"initContainers": [],
"imageRegistryCredentials": [
{
"server": "<server>",
"username": "<uname>"
}
],
"restartPolicy": "OnFailure",
"ipAddress": {
"ports": [
{
"protocol": "TCP",
"port": 80
}
],
"ip": "<ip address>",
"type": "Public",
"dnsNameLabel": "[concat(parameters('containerGroups__name'), '<something>')]",
"autoGeneratedDomainNameLabelScope": "TenantReuse"
},
"osType": "Linux"
}
}
]
}
For the storage account I have the share name, storage account name and the storage account key. Plus of course the mount point inside the Linux container where I want to access the storage. So how can I do this?