https://pulumi.com logo
#azure
Title
# azure
a

ambitious-sugar-80031

01/26/2023, 8:28 AM
Hi all, I have a question about AzureNative and Docker. I am trying to setup a ContainerApp with dotnet and I used the example and that was all working fine. Now I want to add an Azure File share as a Volume but I cannot find any examples or I can not figure it out. Is there someone who can help me out. I can add the code file if required. I am using node-red image.
b

brief-church-89967

01/27/2023, 8:22 AM
I would also like to know how to do this. Adding a persistent volume is basic functionality but I did not find any example, too.
It will be so helpful because then I can move away from the Azure container group in favor of Azure Container Apps. https://github.com/pulumi/examples/tree/master/azure-cs-containerapps
e

early-cat-34152

01/27/2023, 9:24 AM
You could try creating one through the Azure portal and then exporting it as ARM templates. Often gives useful info to reengineer as API calls.
m

many-telephone-49025

01/27/2023, 11:30 AM
Hi @ambitious-sugar-80031 and @brief-church-89967, Trying to figure out the situation: Yes you can create a Azure File share https://www.pulumi.com/registry/packages/azure-native/api-docs/storage/fileshare/ Please use the
2022-05-01
version! And then you can mount the share via the App config:
Copy code
properties:
  managedEnvironmentId: xxxx
  configuration:
  template:
    containers:
    - image: <IMAGE_NAME>
      name: my-container
      volumeMounts:
      - volumeName: azure-files-volume
        mountPath: /my-files
    volumes:
    - name: azure-files-volume
      storageType: AzureFile
      storageName: mystorage
a

ambitious-sugar-80031

01/27/2023, 1:01 PM
Coming a bit further, getting now 'Storage not found under managed environment'. So going to look for that
Got it all working, thank you for the example
m

many-telephone-49025

01/27/2023, 4:00 PM
Awesome!
Is this helping you @brief-church-89967 too? If not hit me up
b

brief-church-89967

01/30/2023, 6:58 AM
Yes, @ambitious-sugar-80031 shared his solution with me, thank you.
44 Views