Upload all containers of Blob Storage IoT Edge module

Boris Lange 1 Reputation point
2020-11-19T09:13:51.173+00:00

We are currently trying to implement the Azure Blob Storage on IoT Edge module into an existing IoT Edge solution. The solution dynamically creates blob storage containers with names that are generated at runtime.

The desired properties configuration "storageContainersForUpload" allows us to define static source container names and dynamic target container names.

"storageContainersForUpload": {
  "sourceContainer": {
    "target": "%c"
  }
}

Since the solution produces dynamic source container names, we need a way to tell the storage module to treat every container as a source container and to use its container name as the target container name.

Please tell me there is a way to implement this behavior. This module is doing everything we need to accomplish, but handling dynamic source container names.

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
567 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,109 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,790 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Sander van de Velde | MVP 32,011 Reputation points MVP
    2020-11-19T23:21:55.983+00:00

    In the past, I tested this with this desired properties:

    {
    "properties.desired": {
    "deviceAutoDeleteProperties": {
    "deleteOn": true,
    "deleteAfterMinutes": 5,
    "retainWhileUploading": true
    },
    "deviceToCloudUploadProperties": {
    "uploadOn": true,
    "uploadOrder": "OldestFirst",
    "cloudStorageConnectionString": "DefaultEndpointsProtocol=https;AccountName=blobtestnestorage;AccountKey=[key of storage in the cloud];EndpointSuffix=core.windows.net",
    "storageContainersForUpload": {
    "updatedblockblobcontainer": {
    "target": "uploaded"
    }
    },
    "deleteAfterUpload": true
    }
    }
    }

    See also this blog for an example where telemetry is generated and sent to a storage account container in the cloud.

    The target container is named 'uploaded'.

    If you want to have the container name changed, you will have to actively change the module twin using eg. an Azure Function which is triggered in some way. This is limited to one container for one module.

    Although untested, perhaps you could experiment with a dynamic path behind one container too?

    1 person found this answer helpful.

  2. Boris Lange 6 Reputation points
    2020-11-26T13:10:51.053+00:00

    Since there's no other solution to this problem, we will stick to the solution, I mentioned in my comment on @Sander van de Velde | MVP post.

    1 person found this answer helpful.

  3. QuantumCache 20,266 Reputation points
    2020-11-20T18:26:23.69+00:00

    Hello @Boris Lange , Thanks for posting this scenario on this forum.

    We have received a response from Microsoft's Product Team on your query.

    At this time source containers need to be explicitly set in the configuration, there is no support for wildchars or dynamic source containers.

    I hope this helps with your query. You can also log a feature request on this page.

    I see that you have already responded to the previous response/workaround provided by Community Champ & MVP @Sander van de Velde | MVP . Please feel free to leave your further comments.

    Please let us know if you need further help in this matter.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.