What I'm actually trying to do is regularly run an azcopy command to copy files from a file share account to a blob account.
I'm primarily using the following:
https://charbelnemnom.com/sync-between-azure-file-share-and-azure-blob-container/
So we have an Azure Automation Account, PowerShell runbook, and an existing docker image with azcopy in it.
This has been very helpful. One big snag is that for no reasons I can identify but I am able to verify, you can no longer specify a full command when creating a container instance, only an executable. If I'm missing something on this point PLEASE correct me with details!
I'm building a complex azcopy command so I'm looking at uploading a script at the time of the container instance creation in my automation runbook.
I'm using New-AzContainerInstanceObject to create my instance and it has a -VolumeMount parameter which allows you to specify an instance of a Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Models.Api20210301.IVolumeMount[]
That can be created with the New-AzContainerInstanceVolumeMountObject command:
https://docs.microsoft.com/en-us/powershell/module/az.containerinstance/new-azcontainerinstancevolumemountobject?view=azps-6.3.0
Great, seem like I'm getting close. I know I could just modify the docker image I'm using but I'm pulling it directly from the repo and want to keep doing that.
Issue with the last command is that there is no example of how to use it and since I know I have to specify the RG, storage account as well as a SAS, the simple parameters asked for are not going to do it.
I did find this:
https://docs.microsoft.com/en-us/azure/container-instances/container-instances-volume-azure-files
But it uses az cli which will not help me with a PowerShell runbook. Really wish that equivalents were kept in sync between cli and PS.
Thanks!