Hello Jaanvi Dhariwal
Welcome to Microsoft Q&A Platform, thanks for posting your query here.
As you have deployed a pre-existing container instance ARM template from a subscription, in the ARM template you have shared storageAccountKey
property is not present.
You need to add the storage account access key to the template and try to redeploy the container instance.
Here's an example of how you can add the storage account access key to the ARM template:
"volumes": [
{
"name": "sftpvolume",
"azureFile": {
"shareName": "sftpfilesharecopy",
"readOnly": false,
"storageAccountName": "sftpstgcopykknuri35dxbgs",
"storageAccountKey": "<storage-account-access-key>"
}
}
]
Replace <storage-account-access-key>
with the access key for the storage account.
Once you have added the storage account access key to the ARM template, you can redeploy the container instance. After the deployment is complete, you should be able to see the storage account associated with the container instance.
Make sure you have the necessary permissions to access the storage account. Ensure that you have the correct role assignments or access control settings for the storage account.
Check if there are any network restrictions or firewall rules that might be preventing access to the storage account. Ensure that the necessary ports for accessing the storage account are open.
Verify that the storage account and the container instance are deployed in the same resource group. If they are in different resource groups, you may not see the storage account in the context of the container instance.
Hope this helps.