1

I am developing a Logic App which is scheduled every minute and creates a storage blob with logging data. My problem is that I must create a container for the blob manually to get it working. If I create blob within a not existing container

enter image description here

I get the following error:

"body": {
        "status": 404,
        "message": "Specified container tmp does not exist.\r\nclientRequestId: 1111111-2222222-3333-00000-4444444444",
        "source": "azureblob-we.azconn-we.p.azurewebsites.net"
    }

This stackoverflow question suggested putting the container name in the blob name

enter image description here

but If I do so I get the same error message: (also with /tmp/log1.txt)

{
  "status": 404,
  "message": "Specified container tmp does not exist.\r\nclientRequestId: 1234-8998989-a93e-d87940249da8",
  "source": "azureblob-we.azconn-we.p.azurewebsites.net"
}

So you may say that is not a big deal, but I have to deploy this Logic App multiple times with a ARM template and there is no possibility to create a container in an storage account (see this link).

Do I really need to create the container manually or write a extra azure function to check if the container exists?

zgue
  • 3,793
  • 9
  • 34
  • 39

1 Answers1

1

I have run in this before, you have a couple of options:

  • You write something that runs after the ARM template to provision the container. This is simple enough if you are provisioning through VSTS release management where you can just add another step.
  • You move from ARM templates to provisioning in PowerShell where you have the power to do the container creation. See New-AzureStorageContainer.
Murray Foxcroft
  • 12,785
  • 7
  • 58
  • 86
  • 1
    So this is really an issue with Logic Apps. I thought I have overseen something or made a mistake in the `Create blob` action. I will go with your PowerShell solution. thanks – zgue Mar 21 '18 at 13:14
  • Given you can store up to 500TB in a blob container most people use a path taxonomy to segregate data. However, if you, like us, use CI and provision environments dynamically, and you want a separate container for each environment for security reasons, then you have to do it manually. :/ – Murray Foxcroft Mar 21 '18 at 13:21